How do you empty the trash on your Mac even when it tells you you can't? There's a Terminal trick for that!
Updated February 2017 with new information about the Terminal command for macOS Sierra.
There are a number of different reasons why your attempt to empty your Mac's trash bin might be thwarted. Maybe an item is "still in use" even though you know it's not. Maybe an item is locked. Maybe an item has a special character that makes your Mac think it's too important to just delete. Whatever the reason, fear not. There is a way you can force your trash bin to empty for good and it can be done using Terminal.
It used to be that you could force the trash to empty on your Mac using sudo rm -rf ~/.Trash/*, but it doesn't work in El Capitan or Sierra. If you are running OS X 10.10 or higher, follow these steps instead.
Note: There are keyboard shortcuts you can use force your Mac to empty the trash that you should try first. You can Control-click on an item in the trash and select Delete Immediately, or you can try holding down the Option key while emptying the trash. This Terminal trick should only be used if the other methods don't work.
How to force the trash to empty on a Mac using Terminal
Use Spotlight to find and launch Terminal on your Mac.
Enter the following command into terminal without hitting Enter afterward.
sudo rm -R
Please note that there is a space after R. Make sure you add a space after R or this command will not work.
Control-click on your Trash icon to open it.
- Select all of the files in your trash folder.
Drag the files into the Terminal window.
- Hit Enter.
- Enter your administrator password. You will not see the password being typed into Terminal. It will look like nothing has changed.
- Hit Enter again.
This may take a while to complete if you have a lot of large files in your trash bin.
If this command didn't work, it might be because you forgot to add a space after the R. Try the process again with a space.
Do you have any questions about using Terminal to force the trash bin on your Mac to empty?
We may earn a commission for purchases using our links. Learn more.
Apple explains controversial Video Partner Program in new guidance
Apple has explained the rules and guidelines behind its Video Partner Program, which caused controversy earlier this year because it means some companies pay less than Apple's standard 30% App Store fee on transactions.
Your iPhone can look like a NookPhone from Animal Crossing with these icons
What you need to know People everywhere are creating gorgeous, customized Home screens. A market for stunning icons has popped up, too. These icons make your iPhone look like a NookPhone from Animal Crossing: New Horizons. Only real fans' iPhones look like NookPhones. There's been a big explosion in the number of people customizing their iPhone Home screens of late thanks to...
NHS COVID-19 app released in England and Wales
The NHS has released its COVID-19 app for England and Wales, featuring risk updates for your area, venue check-in, and of course, contact tracing based on Apple and Google's exposure notification API.
All the HomeKit-enabled routers on the market
HomeKit routers provide much-needed security to the growing smart home device market. Connecting your devices to a HomeKit-enabled router ensures that your home network is safe from outside threats and gives owners control over which devices can connect to the internet.