Your Mac is refusing to empty the Trash. You’ve clicked Empty Trash twice, tried right-clicking the Dock icon, maybe even restarted once already, and you’re still staring at an error about a file being “in use” or “locked.” You needed this working ten minutes ago.
macOS blocks Trash from emptying for a handful of specific reasons: a file is still open in an app, a file has a lock attribute set, there’s a permissions mismatch, or there’s an issue with the Trash directory itself. The fixes below go from quick to aggressive. Work through them in order.
Before you start: Make sure you actually want to delete everything in there. Several of these methods skip macOS’s normal confirmation steps, and the Terminal option at the end is permanent, no undo. If there’s any doubt, check that your Time Machine backup is current before going further.
Quick Fixes
1. Quit the App That’s Using the File
The most common culprit: an app still has one of those files open. macOS won’t delete an actively open file, full stop.
- Press
Cmd + Option + Escto open Force Quit Applications.
- Select the app you think is holding the file, then click Force Quit. (Need help identifying the right one? Check our guide on closing unresponsive apps on Mac.)
- Try emptying the Trash again.
Not sure which app? Quit anything that works with files, browsers, photo editors, video apps, then retry.
2. Restart Your Mac
A restart closes every background process and clears memory. If something was silently holding a file open, a restart breaks that hold.
- Click the Apple menu and select Restart.
- When your Mac is back up, right-click the Trash icon in the Dock and choose Empty Trash.
If that clears it, you’re done. If macOS is still complaining, keep going.
Deeper Fixes
3. Hold Option to Force Empty
macOS has a built-in force-empty shortcut that most people don’t know about. Holding Option while you empty the Trash tells macOS to skip the confirmation warning it normally shows for locked or in-use items, which clears many simple locked-file cases.
- Hold Option on your keyboard.
- While holding it, right-click the Trash icon in the Dock and choose Empty Trash, or click Finder in the menu bar and choose Empty Trash.
- Confirm the deletion when prompted.
This resolves many locked-file warnings on Ventura, Sonoma, and Sequoia without touching Terminal, but it doesn’t force-delete a file that’s still open in another app or blocked by permissions — use the steps below for those.
4. Delete Problem Files Individually
One bad file can block the entire Trash from emptying. Remove just that file first, then empty the rest.
- Click the Trash icon in the Dock to open it.
- Right-click the problem file and select Delete Immediately.
- Confirm the permanent deletion.
- Try Empty Trash again from the Dock or Finder menu.
You can also select a file and choose File > Delete Immediately from the menu bar, same result either way.
5. Clear the File Lock
Files can carry a lock attribute that prevents deletion. Holding Option usually bypasses this, but you can clear the lock directly too.
Single file:
- Open the Trash, right-click the locked file, and choose Get Info (or press
Cmd + I).
- Uncheck the Locked checkbox in the Info panel.
- Try emptying the Trash.
Multiple locked files, faster via Terminal:
Open Terminal (Cmd + Space, type Terminal, press Return) and run:
chflags -R nouchg ~/.Trash/*
This clears the lock attribute from everything in your Trash at once. Then empty normally from Finder.
6. Boot into Safe Mode
Still getting a “file is in use” error after restarting? A background process or startup item is likely relaunching every time and holding that file. Safe Mode loads macOS with only the essentials, no third-party launch agents, no extra kernel extensions.
Apple Silicon Macs (M1, M2, M3, M4 and later):
- Shut down your Mac completely.
- Press and hold the power button until the startup options screen appears.
- Select your startup disk, hold Shift, then click Continue in Safe Mode.
Intel Macs:
- Restart your Mac.
- Hold Shift immediately, keep holding until the login window appears.
You’ll see “Safe Boot” in the menu bar when Safe Mode is active. Empty the Trash normally from there, then restart to exit Safe Mode.
Nuclear Option: Terminal
If nothing above has worked, Terminal will get it done. Be clear on what that means: these commands are permanent. No undo, no recovery, no fishing the files back out of the Trash.
Back anything you want to keep to a Time Machine drive, an external hard drive, or cloud storage before running this.
Delete everything in the Trash:
- Open Terminal, press
Cmd + Space, typeTerminal, press Return.
- Type this command exactly as written:
sudo rm -rf ~/.Trash/*
- Press Return.
- Type your administrator password when prompted. The cursor won’t move, that’s normal. Press Return again.
Your Trash is now empty.
Target only specific files (safer approach):
- In Terminal, type
sudo rm -R, leave a space afterR, don’t press Return yet. - Open Trash from the Dock.
- Drag the specific problem files into the Terminal window. Their full file paths fill in automatically.
- Press Return and enter your password.
This deletes only those files rather than clearing your entire Trash.
Quick Diagnostic
Not sure which fix applies to your situation? This narrows it down:
- “The item can’t be moved to the Trash because it is in use” → Quit the app using it, restart, or boot into Safe Mode.
- “The item is locked” → Hold Option while emptying, or uncheck Locked in Get Info.
- One file blocking everything else → Use Delete Immediately on just that file.
- Permission error → The
sudoTerminal command handles this. - Still stuck after all of the above → Full Terminal force-delete with
sudo rm -rf ~/.Trash/*.
The Option key trick and Safe Mode resolve most stuck-Trash situations. Reserve Terminal for the genuinely stubborn cases.
When to Contact Apple Support
If the Trash still won’t empty after running the Terminal command, there may be an underlying disk error. Open Disk Utility (Spotlight > Disk Utility), select your startup disk, and run First Aid. If that passes clean and the problem persists, contact Apple Support or visit an Apple Authorized Service Provider.
If this started right after a macOS update, check for a newer point release at Apple menu > System Settings > General > Software Update. Some macOS releases ship with Trash-related bugs that get patched quickly.