Eject Photos external drive used by Library scan and Media analysis macOS processes
Photos library on an external hard drive - how to safely eject it when it is being used by photoanalysisd or photolibraryd or mediaanalysisd or Spotlight ?
so I guess many people are doing it somehow - what is the best way guys?
just now happened to me - and I've done the good old lsof
it of course returned a whole bunch of processes - then I had to Quit them
and in case of photolibraryd - this process was a stubborn one, I had to kill it with Force Quite eventually, it didn't want to give up.
any more elegant way to do this? Maybe there is a central Force Eject or parent process that I can gracefully quit, so free up the hard drive ?
% sudo lsof /Volumes/T5SSD
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mds 571 root 24r DIR 1,25 576 2 /Volumes/T5SSD
photolibr 28517 MYUSEDIR txt REG 1,25 18612224 57654 /Volumes/T5SSD/Photos Library.photoslibrary/database/Photos.sqlite-shm
MacBook Air (M5, 2026)