Getting files back
A Trash that refuses to empty has a specific cause, and force-deleting blindly is the wrong first move.
Something has the file open — often the app that created it, sometimes a background process. Quit the obvious app; if that fails, find the holder:
lsof | grep -i "filename"
Quit whatever lsof names, then empty.
Locked files (a flag, set in Get Info or by some apps) block emptying. Option-Empty Trash (hold Option while choosing Empty Trash) skips locked items. Or clear the flag:
chflags -R nouchg ~/.Trash
A file owned by another user — common after copying from another Mac — cannot be removed by you. Fix ownership on the Trash contents:
sudo chown -R "$(whoami)" ~/.Trash
The file may be in a drive's .Trashes, and a permission or lock issue there blocks the whole empty. Emptying with the drive connected, or clearing its trash directly, resolves it:
sudo rm -rf /Volumes/DriveName/.Trashes
(Only for a drive you control.)
rm -rf ~/.Trash/*
This bypasses Finder entirely. Use it knowing it is irreversible and offers no "are you sure" — check what is in there first (ls -la ~/.Trash), because force-emptying is exactly how the file you meant to recover disappears.
Restart — it releases every file handle and clears most "in use" states — then empty normally before opening anything.
An app or process has it open. lsof | grep filename names the holder; quit it, then empty.
rm -rf ~/.Trash/* in Terminal bypasses Finder — irreversible, so check the contents first.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Download for Mac