Troubleshooting & error messages

Can't Empty Trash on Mac: "File in Use" Error — Fix It (2026)

You drag a file to the Trash, go to empty it, and macOS stops you cold: "The operation can't be completed because the item is in use." This is one of the most common frustrations on macOS, and it almost always has a clear cause and a straightforward fix. This guide walks you through every solution — from the quick one-second trick to the Terminal command you use only when nothing else works — so you can force empty Trash on Mac safely and confidently.

Why macOS Says a Trash File Is "In Use"

macOS prevents you from deleting a file that another process currently holds open. Think of it like trying to pull a book from someone's hands while they're reading it. Common culprits include:

  • An app you closed but that is still finishing background work (indexing, syncing, writing logs)
  • Spotlight indexing the file at the exact moment you try to empty Trash
  • A media file that is queued in a player even after the app window is gone
  • A mounted disk image (.dmg) whose contents are in the Trash
  • iCloud Drive or Dropbox syncing the file
  • A file that belongs to a different user account or is owned by root

Knowing the cause makes picking the right fix much faster.

Step 1 — Quit the Most Likely Locking App

Before reaching for Terminal, start here. Think about what you had open recently.

  1. Look at the file name shown in the error dialog. Its extension usually reveals the app: .psd → Photoshop, .mp4 → IINA or QuickTime, .pkg → Installer.
  2. Fully quit that app — not just close its window. Press Command-Q or right-click its Dock icon and choose Quit.
  3. Wait a few seconds, then try emptying Trash again.

If the app was a cloud sync service (Dropbox, OneDrive, Google Drive), pause syncing before quitting.

Step 2 — Find Exactly What Is Holding the File

If step 1 didn't work, you need to identify the specific process. macOS ships with Activity Monitor and a command-line tool for this.

Using Activity Monitor

  1. Open Activity Monitor (Applications → Utilities → Activity Monitor).
  2. Use the search box in the top-right to search for the file name or the suspected app name.
  3. Select the process and click the X button in the toolbar, then choose Quit or Force Quit.

Using Terminal's lsof

The lsof ("list open files") command tells you exactly which process has a file open. Replace filename with the actual file name from the error:

lsof | grep filename

The output shows the process name and its PID (process ID) in the second column. You can then quit that process in Activity Monitor or kill it in Terminal:

kill -9 <PID>

Use kill -9 only on user-space processes you recognize. Never kill system processes like kernel_task, launchd, or WindowServer.

Step 3 — Option-Empty Trash (Force Empty)

macOS has a built-in force-empty shortcut that bypasses the lock warning:

  1. Hold the Option key on your keyboard.
  2. While holding Option, click the Finder menu in the menu bar.
  3. The "Empty Trash" item changes to "Empty Trash…" — click it.

This tells Finder to ignore in-use checks and delete anyway. It works in the majority of cases where the locking process is minor or has already ended. It is safe for standard user files.

Step 4 — Restart and Empty Immediately

A restart clears all open file handles. When your Mac restarts, open Finder and empty the Trash before launching any other app. This is almost always effective when Option-Empty was not.

Step 5 — Delete in Safe Boot

Safe Boot starts macOS with a minimal set of processes — no login items, no third-party extensions. If a background helper or login agent is locking the file, Safe Boot removes it from the equation.

Intel Mac

  1. Shut down your Mac completely.
  2. Power it on, then immediately hold the Shift key until you see the login screen.
  3. Log in (you may need to log in twice on FileVault Macs).
  4. Open Finder and empty the Trash.
  5. Restart normally when done.

Apple Silicon Mac (M1/M2/M3/M4)

  1. Shut down your Mac completely.
  2. Press and hold the power button until you see "Loading startup options."
  3. Select your startup disk, then hold Shift and click Continue in Safe Mode.
  4. Log in, empty the Trash, then restart normally.

Step 6 — Terminal: Delete the File Directly

If nothing else has worked, you can delete the file from the command line using rm. This is permanent and skips the Trash entirely — there is no undo.

# First, find the Trash path for your account
ls ~/.Trash/

# Delete a specific file (replace "filename.ext" with the actual name)
rm ~/.Trash/filename.ext

# For a folder and everything inside it
rm -rf ~/.Trash/foldername/

If the file is owned by root or another user, prefix the command with sudo:

sudo rm ~/.Trash/filename.ext

You will be prompted for your administrator password. Double-check the path before pressing Return. The rm -rf command is irreversible.

Special Cases

The File Is a Disk Image (.dmg)

Eject the disk image first: in Finder's sidebar, click the eject arrow next to the mounted volume. Then empty the Trash.

The File Belongs to a Mounted External Drive

Eject the drive first, then check if the file moves to the Trash for that drive (stored at /Volumes/DriveName/.Trashes/). Connect the drive, eject it cleanly, and the Trash should clear.

The File Is Locked

macOS lets you lock files to prevent accidental deletion. Select the file in the Trash (open the Trash window first), press Command-I to open Get Info, and uncheck the Locked checkbox. Then try emptying again.

Which Method to Use When

Situation Best fix Risk level
You know which app locked the file Quit that app, then empty None
Unknown locking process Option-Empty or lsof + kill Low
File locked after restart Safe Boot None
System or root-owned file Terminal rm with sudo Medium — verify path first
Locked file attribute Unlock via Get Info None

After Emptying Trash: Actually Free Meaningful Space

One stuck file is rarely why your Mac feels full. The bigger culprits are system caches, application logs, and purgeable System Data — often multiple gigabytes — spread across ~/Library/Caches, /Library/Logs, and the system's temporary directories. Cleaning these manually means hunting through dozens of folders and guessing what is safe to delete.

Crumb handles this in one click: it identifies and removes safe-to-delete caches, logs, and temp files across your whole Mac — system-level and per-user — without touching files that would break apps or the OS. If you are ever unsure whether a folder is safe to remove, Crumb's built-in "Is this safe to delete?" explainer describes what the folder does and rates its removal risk before you commit. You can download Crumb and run a free cleanup to see exactly how much is recoverable on your machine.

Conclusion

The cant empty trash file in use mac error almost always resolves by quitting the locking app, using Option-Empty, or restarting. Safe Boot and Terminal's rm are reliable escalation steps for stubborn cases — just treat the -rf flag with respect, since there is no recovery once a file is gone that way. Work through the steps in order, and you will have a clear Trash in a few minutes.

Reclaim your disk in one click

Crumb audits your whole Mac, tells you what's safe to delete, and frees the space in seconds — private, local, and Apple-notarized.

Download Crumb for macOS

Frequently asked questions

Why does macOS say 'the operation can't be completed because the item is in use' even after I close the app?
Some apps continue background processes — indexing, syncing, or writing final log entries — for several seconds after you close their window. The process still holds an open file handle during that time. Waiting 10–15 seconds after quitting and trying again usually resolves it. If not, use Activity Monitor or the lsof command to confirm the process has actually exited.
Is it safe to use 'rm -rf' to delete files from the Trash?
It is safe as long as you carefully verify the full path before pressing Return. The command permanently deletes files with no way to recover them from the Trash afterward. Always run 'ls ~/.Trash/' first to confirm the exact file name, then target only that specific file rather than using a wildcard.
Can I force empty Trash on Mac without Terminal?
Yes. The easiest non-Terminal method is Option-Empty Trash: hold the Option key while clicking the Finder menu, and 'Empty Trash' changes to a force-empty variant that bypasses in-use checks. If that fails, a restart followed by immediately emptying Trash before opening any other app works in most cases.
Does Crumb delete files from the Trash, or is it a separate tool?
Crumb is a separate disk-cleaning tool focused on caches, logs, temp files, and purgeable System Data — the space that accumulates over time regardless of your Trash. It complements Trash cleanup rather than replacing it, and its one-click Clean is useful after you've already resolved any stuck Trash files.