How to Quickly Empty the Trash in macOS Using Terminal.force empty trash mac.empty trash mac.
When you delete a file on Mac, you only hide it in the Finder. To delete it and free up the associated disk space, you need to empty the Trash. Holding down the Control key, clicking the trash can icon and choosing the “Empty Trash” option is the quickest way to do this.
However, it is not always easy to get rid of the contents of the recycle bin permanently and can lead to errors. So if you run into any problems, you can quickly empty the Trash on macOS by using Terminal instead. The complete procedure can be found below.
Table of Contents – force empty trash mac
Delete the Trash in Mac Using Terminal (macOS El Capitan and Later)
If you’re using a Mac running macOS 10.11 El Capitan or later (like Big Sur or Monterey), you can quickly empty the Trash using Terminal.
1. Open the launchpad and choose Other> Terminal.
2. Enter the following command:
sudo rm -r
Note: don’t run the command yet.
3. Press the Space bar once to add one space to the end of the command. This must be done. Otherwise, the command will fail.
4. Open the basket.
5. Select the files you want to delete while holding down the Command key. If you want to delete everything, press Command + A to instantly select all files and folders.
6. Drag the selected files to the trash can. Depending on how many items you want to remove, Terminal may display multiple file paths.
7. Press Enter.
8. Enter the administrator password.
9. Press Enter. The terminal will remove the specified items from the recycle bin. You won’t get confirmation, so it’s best to check again.
If Terminal is unable to delete a specific file or files, adding the f parameter will (forcefully) override problems caused by permission conflicts. In step 2, enter sudo rm -rf.
Emptying the Trash will permanently delete your files (unless you’ve set up Time Machine on your Mac). Hence, if you prefer confirmation before deleting each time, you can use the i (interactive) option, such as sudo rm -ri.
Delete the Trash in Mac Using Terminal (macOS Yosemite and Earlier)
On a Mac running macOS 10.10 Yosemite or earlier, emptying the Trash using Terminal is relatively easy.
1. Open the launchpad and choose Other> Terminal.
2. Enter the following command:
sudo rm -rf ~ / .Trash / *
3. Press Enter.
4. Enter the administrator password.
5. Press Enter.
Alternative Ways to Delete Problematic Files in Trash
Deleting a basket using the terminal is quick. But this is also inconvenient. If you are unable to empty the Trash using the graphical user interface on macOS due to a specific file or files, use the pointers below next time.
Remove elements individually
Try to delete all problematic files or folders individually. To do this, open the Trash, Control-click the problematic item and choose Delete Immediately.
Unlock files and check permissions
macOS can prevent you from deleting a locked file or folder. Try to unblock. To do this, Control-click an item in the Trash and choose Get Info. Then uncheck the “Blocked” box.
While you’re at it, you can also scroll down to the Sharing and Permissions section and set your account’s Permissions to Read and Write. You may not be able to do this if you do not have administrator rights.
Force quit related programs
Try closing any programs that might interfere with permanently deleting the file or folder. You can do this by holding down the Control key, clicking the application icon through the Mac Dock, and choosing Quit. For example, if you’re having trouble deleting a Pages document, exit the Pages app entirely.
In addition, you can check if the corresponding program is frozen. To do this, open the Apple menu and select Force-quit. If the program appears in the list, select the item and select Force Quit. Here are other ways to force close apps on macOS.
Restart your Mac
Restarting your Mac can also help resolve errors, crashes, and conflicts preventing you from emptying the Trash.
Just open the Apple menu and choose Restart. Then leave the box next to “Reopen windows on re-login” unchecked and select “Restart.”
Disable conflicting launchers
If you’re still having trouble emptying the Trash normally, you might have a conflicting program that boots with macOS.
To remove it, open the Apple menu and choose System Preferences> Users & Groups. Then select your account in the sidebar and go to the Login Items tab. Then select and uninstall any applications that might be causing problems with a particular file format.
Booting your Mac into Safe Mode can also help you identify problematic or intermittent launchers and extensions causing problems.
Take Out the Trash
While it is possible to empty the Trash using Terminal on macOS, it is best to stick with a graphical user interface whenever possible. Taking the time to figure out what is stopping you from deleting files from the Mac Trash, rather than forcefully deleting its contents, can help you avoid solving the same problem in the future.
That being said, if you end up permanently deleting files and folders that you later want to recover, don’t forget to recover your lost items using Time Machine.
How to Quickly Empty the Trash in macOS Using Terminal
How to Quickly Empty the Trash in macOS Using Terminal
force empty trash mac
force empty trash mac
empty trash mac