:e ~/article/osx-mac-os-empty-trash.md [readonly]

smjrifle@smjrifle.xyz:~/article/ $

OSX / Mac OS Empty Trash

Sometimes while deleting files from trash, mac os gives error that the file is in use. It is very difficult to track down the application that uses the file. The following commands can be of some help.

<code>lsof | grep Trash</code>

The above command shows you the application that is using the file from trash. You can then close that application or force kill the process.

Another way is to force empty the trash:<br>
<code>sudo rm -rf ~/.Trash/*</code>

Be careful with this command as it permanently deletes everything in the trash.

[:bp] Weekly DIY and Workshops [:bn] Git Auto Pull Push Script — Automate Your Deployment Workflow
-- NORMAL -- osx-mac-os-empty-trash.md PHP UTF-8 0% smjrifle@xyz