Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Cannot empty trash because item is in use' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Cannot empty trash because item is in use
Authored by: vykor on May 24, '13 08:47:42AM

There is another minor caveat with the rm-based alternative. If you rm a file while it is in actual use, you will most likely not get the disk space back until that file is released by whatever is holding an open file descriptor to it. The file will disappear from the Trash and directory listings, so if you just like to see an empty Trash icon, then ok. If you actually want the disk space marked as free for other uses, this is usually not enough.

For large files, more comprehensive (though time consuming) solution is to use lsof | grep <filename> to check what process is holding the file open, and then killing that process. This way you can use empty trash from the GUI and guarantee yourself the disk space back.

[ Reply to This | # ]