You drag a file to the Trash, hit Empty Trash, and macOS stops you with: “The operation can’t be completed because the item “Filename” is in use.” It is one of the most common and most annoying Mac hiccups — and in almost every case it means one thing: an app still has that file open in the background. Here is how to clear it, fastest fix first.
Why this happens
macOS will not delete a file while a running program holds it open. That program might be obvious (a Word document you still have on screen) or invisible (Preview quietly caching a PDF, a Music app scanning your library, or a Time Machine backup mid-run). The Trash cannot empty until every app lets go of the file.
1. Quit the app that made the file (the 10-second fix)
Think about what the stuck file is: a photo, a PDF, a spreadsheet, a video. Quit the app that opens that kind of file — not just close the window, actually Quit it (Command + Q, or right-click the Dock icon → Quit). Then try Empty Trash again. This alone fixes it most of the time.
2. Quit every open app, then empty
If you are not sure which app is holding the file, quit them all. Press Command + Option + Esc to open the Force Quit window, select each app, and quit it. Leave only Finder running, then empty the Trash. If an app is frozen and will not quit, our guide on how to force quit a frozen Mac walks through every method.
3. Relaunch Finder
Sometimes Finder itself is the culprit. Hold Option and right-click the Finder icon in the Dock, then choose Relaunch. Finder restarts in a second or two and releases any file locks it was holding. Try emptying the Trash again right after.
4. Restart the Mac
A full restart closes every background process at once — the surest way to release a file nothing seems to be using. Choose Apple menu → Restart, and empty the Trash the moment the desktop loads, before any apps reopen.
5. Is the file locked? (a different message, same annoyance)
If the error mentions the item is locked rather than in use, the file has its Locked flag set. Take it out of the Trash, click it once, press Command + I to open Get Info, and uncheck Locked. Put it back in the Trash and empty. To skip the warning on locked items entirely, hold Option while choosing Empty Trash.
6. Force-empty from Terminal (last resort)
If nothing above works, you can force macOS to remove the Trash contents. Open Terminal (Applications → Utilities), type this exactly, press Return, and enter your password when asked:
sudo rm -rf ~/.Trash/*
Read this first: that command deletes the Trash permanently with no undo. Double-check there is nothing in the Trash you might want — if you are not certain, see how to recover deleted files on a Mac before you run it. Only use Terminal after the gentler steps have failed.
7. Still stuck? Try Safe Mode
Boot into Safe Mode (on Apple silicon: shut down, hold the power button until “Loading startup options” appears, pick your disk while holding Shift; on Intel: hold Shift during startup). Safe Mode loads the bare minimum, so nothing extra can be holding your file. Empty the Trash there, then restart normally.
If your Trash keeps filling up
A Trash that will not empty is sometimes a sign the drive is nearly full and macOS is struggling. If you are constantly fighting for space, our guide to what to do when your Mac storage is full helps you reclaim gigabytes fast. And if the machine has felt slow and cramped for years, it may simply be time — a refurbished MacBook with a bigger, faster SSD from our Apple clearance section often costs less than a repair and comes with warranty.
Frequently asked questions
Why does my Mac say a file is in use when nothing is open?
An app in the background — Preview, Music, Photos, a cloud-sync client, or Time Machine — still has the file open even though you see no window. Quitting all apps or restarting releases it.
How do I force empty the Trash on a Mac?
Hold the Option key while choosing Empty Trash to skip warnings, or restart and empty before apps reopen. As a last resort, sudo rm -rf ~/.Trash/* in Terminal removes everything permanently — use it carefully.
Will emptying the Trash this way delete anything I need?
Only the items already in the Trash. It does not touch files elsewhere on your Mac. Still, once the Trash is emptied the files are gone — check before you force it.
The file is in use even in Safe Mode. What now?
That points to a deeper disk or permissions issue. Run First Aid in Disk Utility (Applications → Utilities → Disk Utility → First Aid). If the disk reports errors, back up what you can and have the drive checked — a failing SSD can make files un-deletable.