You click Empty Trash and nothing happens, or it stops with “The file is in use”, or the Trash comes back full after a minute. All three have ordinary causes: a running app still holds one of the files, the files sit in another drive’s own Trash, or a permission gets in the way. Here is how to tell them apart and empty the Trash for real — without sudo rm gambles.
A file is “in use”: close the app that holds it
macOS and Ubuntu both refuse to delete a file an app has open. The usual suspects: a media player still holding a deleted video, an editor with the file in a tab, a backup or sync tool (Time Machine, Dropbox, Deja Dup) mid-run, and on Ubuntu a terminal whose working folder is inside the Trash. Close those apps and empty again.
To see which process holds a file:
lsof +D ~/.local/share/Trash/files 2>/dev/null
On macOS, search for the file name in Activity Monitor’s process list, or just log out and back in — every app lets go, and the Trash empties.
The Trash you see is not the only Trash
Each drive keeps its own Trash:
- On a Mac, files you deleted from a USB stick or external drive stay in that drive’s hidden
.Trashes/<your user id>folder — emptying the home Trash does not touch them, and the drive keeps filling up. - On Ubuntu, the same idea with
.Trash-1000(your user id) in the drive’s root, plus~/.local/share/Trashfor the home folder.
Empty a drive’s Trash by deleting the files in .Trashes/.Trash-1000 for your own user only — never other users’ folders — or let CleanMate’s Trash on external drives item list each drive’s Trash with its size and empty the ticked ones (the Trash folder itself stays).
Permissions
Ubuntu refuses to empty a Trash whose files belong to another user — common after copying from an old install with sudo. Fix the ownership once, then empty normally:
sudo chown -R "$USER" ~/.local/share/Trash
gio trash --empty
gio trash --empty is GNOME’s own way to empty every Trash it manages (home and mounted drives). On macOS, Finder asks for the password when a locked item needs it; a file owned by root in the Trash empties after you type it.
Flatpak and snap apps keep their own Trash
Sandboxed apps put deleted files in their own data: a snap Firefox’s Trash is under ~/snap/firefox/common/.local/share/Trash, Flatpak apps’ under ~/.var/app/<app id>/.local/share/Trash. If “empty the Trash” in the app itself fails, close the app and delete the files inside those Trash folders — the rest of the app’s data stays.
What not to do
- Don’t
sudo rm -rf ~/.local/share/Trash/*“to be sure”: a mistyped path does unrecoverable damage, and it is never needed — own the files first, then empty. - Don’t delete the Trash folders themselves (
~/.local/share/Trash,.Trashes): apps expect them to exist. - Don’t hold Option/Shift to “force empty” system-protected items; if macOS refuses, an app is still using the file.
How CleanMate does it
- On a Mac, CleanMate 1.12’s Smart Scan has an Empty Trash item — unticked, so emptying is always a decision — and after moving anything to the Trash it offers Empty Trash…, which asks before deleting for good. Trash on external drives lists each drive’s
.Trasheswith its size, unticked, and never touches other users’ or network drives (all macOS features). - On Ubuntu, CleanMate’s Trash item empties the home Trash with
gio, and the same Trash on external drives idea covers.Trash-1000folders on mounted drives; everything asks first and nothing is deleted without your tick (the Ubuntu app).
And if the worst has already happened — the Trash was emptied while something you needed was in it — see what can still be restored and what cannot.
Related: Trash on external drives, free up disk space on a Mac and on Ubuntu. CleanMate is free and open source: download it.
FAQ
Empty Trash runs but the space doesn’t come back. The files were on another drive: check that drive’s own .Trashes/.Trash-1000, and Time Machine local snapshots on a Mac.
Can I delete .Trashes on the drive itself? You can delete the files inside your user’s folder there; deleting the folder itself is unnecessary and some apps recreate it with odd permissions.
Why does the Trash refill itself? Something is still deleting into it — a sync tool restoring conflicts, or an app that trashes its old logs on launch. Empty after closing it, and watch which app writes next.
