3

I have an external hard drive that is APFS encrypted, but I also tested this with an APFS drive that is not encrypted.

Simply put, I mount my hard drive, view some files via quicklooking (press space on the item) or launch them into VLC, then eject the drive. There is a catch, and that most of the times I do this, I have to force quit all quicklook tasks via activity monitor. The error actually just says it's being used (doesn't say what task) and gives me a prompt to wait, cancel, or force eject.

So, how can I make it so quicklook isn't always preventing my hard drive from ejecting and 'yank it out' preferably shouldn't be a solution. None of the files are applications, but dmg files that I look through, and yes; I've ejected everything or closed every window before ejecting the drive.

1
  • This has been an issue with QuickLook for years and has never been fixed by Apple. Commented Aug 19, 2022 at 22:32

2 Answers 2

4

I don't have an answer for how to prevent QuickLook from keeping a file on the disk open in the first place; this has been a bug with QuickLook for a very long time.

I have to execute this command every time QuickLook prevents eject:

killall -9 QuickLookSatellite

Then I can eject the disk.

2
  • Whoa, this answer! Finally found a solution as lsof was always pointing to QuickLook process which was blocking my drive after previewing .dng file. sudo pkill -f QuickLook almost never worked but killing QuickLookSatellite finally solves the problem! Previously I've had to shut down my mac, as I'm too afraid to Force Eject my precious NVMe drive... Huge thanks!
    – adyry
    Commented Apr 15, 2023 at 18:15
  • I had to use killall -9 QuickLookUIService on macOS Sonoma. Not sure if they renamed it or if it's a separate process, but hopefully this helps someone else.
    – coreyward
    Commented May 29 at 20:22
0

Before trying to eject your hard drive, make sure none of the files you "quicklooked" from your external hard drive are currently selected.

If any of the files from your external hard drive are currently running in VLC or any other app., those files need to be closed before you can eject the external hard drive.

If you still cannot eject your external hard drive after my first 2 suggestions. open Terminal.app and enter this command killall -KILL Finder

That will kill and relaunch Finder, which should also kill any stubborn quick look processes which are stopping you from ejecting your external hd.

If this happens often enough, you may consider creating a new Automator quick action and add a "Run Shell Script" command to the workflow and use the code from above. Then you could assign a keyboard shortcut to your new Quick Action, in System Preferences.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .