Quick Tip: Force Empty the Trash on macOS with the Terminal

This is a super quick tip, but you can actually empty your Mac’s trash from the Terminal. Why would you want to do this? Well, sometimes your computer will simply not let you empty the trash for some reason you can’t understand.

The most common case is where you try to empty your trash and you get a pop up that says something to the effect of “file XYZ is in use and can not be deleted.” The file probably is in use somehow, but if you want to blow through that message, enter this command in the Terminal app (Applications > Utilities):

sudo rm -rf ~/.Trash/*

Put simply, this will remove everything from the trash, even if the Finder won’t let you do it. Note that this could absolutely cause an issue if there actually was something in the trash that your Mac was trying to keep you from deleting, so you could possibly do some damage. Be safe.