Are you trying to empty the trash on Mac but to no avail? Learn how to empty trash terminal Mac and other effective methods in this new article.
Sometimes you want to clean up some purgeable files on your Mac, but there are files inside the Trash folder that cannot be removed no matter how you try. There are several reasons why this is happening. It can be that the files are damaged, locked, and more. Today we will learn how to empty the trash to have your space freed up using various effective methods.
Contents: Part 1. Why Can't I Empty My Trash?Part 2. How Do I Empty the Trash in Terminal?Part 3. How Do I Empty Trash in Recovery Mode?Part 4. How to Empty Trash on Mac Fast?Part 5. Can't Empty Trash on Mac Because File Is in Use?Part 6. Summary
Part 1. Why Can't I Empty My Trash?
Before leaning how to empty trash via Terminal on Mac, let's see why you can't empty your trash. The trash bin is often referred to as the easiest folder to manage on Mac, you simply need to drag and drop the files to clean up. If you think Trash is the easiest file in your Mac, think again, there are many possible reasons why sometimes you will experience issues with the trash bin.
Tip: If you don't know where is Trash on Mac, just check this post to learn more details.
Here are some possible reasons:
- Some files are in use even if they are really not
- Some files need to be repaired
- A special character in the file name can let your Mac think it's important and avoids deleting it
Whatever reasons your Mac is hiding from you, for sure, there is a way you can force the trash and empty it for good. Today, we will find out how to erase the files inside the trash bin and empty it for good.
Part 2. How Do I Empty the Trash in Terminal?
Are you often receiving an error message that says: “This operation cannot be completed because the item [file name] is in use.”? This error usually appears even if you don’t have any open files and the best thing you can do is to restart your Mac. The after restarting, you can empty Trash via terminal on Mac, or follow the steps below.
After restarting Mac, launch the Terminal via spotlight and follow these steps to empty trash Mac:
- Enter
sudo rm –R
(Do not hit enter and make sure you copy it correctly with the correct spaces) - Press
Control
+ click on the Trash icon to open - Select all the files inside the Trash
- Drag all the files into the terminal window
- Press
Enter
- If required, enter the Administration password
- Again hit
Enter
That’s it! You have just emptied the Trash folder in your Mac. In case the steps didn’t work, make sure that the command you entered is correct.
Part 3. How Do I Empty Trash in Recovery Mode?
If empty Trash via terminal on Mac option was unsuccessful then try doing this to empty the trash folder via Safe Mode.
- Reboot Mac in Recovery mode
- Press
Command + R
keys when the device is rebooting - Click Terminal from macOS Utilities window
- Enter the command:
csrutil disable
; reboot into the Terminal - Hit
Enter
. Note: You will see a message saying that System Integrity Protection has been disabled and your Mac needs to restart - Let the Mac reboot itself
Since Mac 10.11, System Integrity Protection or SIP, or also known as the rootless feature, was applied to prevent malicious software from changing protected files in Mac. You need to disable the SIP temporarily in order to remove files protected by SIP. You can turn it off in OS X El Capitan or the later versions using the steps above. Pretty simple isn’t it? Now you can do this anytime your Mac won’t allow you to empty the trash folder.
Part 4. How to Empty Trash on Mac Fast?
When all these above steps on how to empty Trash via terminal on Mac or Safe Mode fail and your Mac still will not allow you to empty your trash folder, it may mean that some apps or services are restricting you to do so. To better understand what is happening and to best empty, the trash folder or other system junks, use PowerMyMac by iMyMac. This is all-in-one solution software that erases all unnecessary files, mail trash, and even large and old files. Besides, using iMyMac PowerMyMac to empty your purgeable space on Mac is another good choice to get more storage on your Mac.
Here are the steps to use PowerMyMac:
- Download and install software
- Launch PowerMyMac and click Junk Cleaner on the left pane
- Click SCAN to begin
- Choose all the junk files in the display or you can rather erase those trash files only
- Click on the CLEAN button.
- Trash is finally empty!
You can take advantage of the PowerMyMac’s efficient cleaning and scanning. Using this program you can track down the status of your Mac to see what affects its performance.
Part 5. Can't Empty Trash on Mac Because File Is in Use?
When you can't empty Trash via terminal on Mac, there are may be some situations where the files are locked or destroyed which can hinder you from deleting all files inside the Trash folder. These files will only clog up later on so it is better to remove them as early as possible.
If you notice that the files are locked, you do the following:
- Make sure the file or folder is not stuck up. You can right-click on the folder and click Get Info.
- See if the locked option is checked; remove the check to empty the Trash.
Another option is to repair the Disk using the Disk Utility. You can use this option if the file is destroyed. You need to do the following to permanently delete from the Trash:
- Start Mac in Recovery mode
- Press and hold down
Command + R
keys when it is rebooting - Release the keys when the Apple logo with the progress bar appears
- Choose Disk Utility and click Continue
- Select the disk that has the entire files you need to delete.
- Click on First Aid to repair the disk
Part 6. Summary
You can empty Trash via terminal on Mac or other several options we have just provided. In case you are caught up with any of the given situations above, you now understand what to do. It is always better to regularly clean up your Trash folder because it affects the entire performance of Mac. If possible, you can choose to install iMyMac PowerMyMac, this is an all-in-one solution that can clean, fix and scan your Mac at any time.
Have you tried any of the steps we recommended above? Share us your thoughts in the comments below!
Jeremy Lanssiers2022-09-14 20:42:03
The whole article and all its steps can be performed by one command: rm -rf "$HOME""/.Trash/*"
tom2023-11-17 06:04:19
where does this work?
Patrizio2020-10-09 19:08:28
Salve, purtropo nessuno di questi metodi, come anche tutti i metodi incontrati in giro terminale non terminale, vari riavvi o utility sembrano non funzionare con il mio file "com.apple.fpsd.plist" è una vera rogna! :) Grazie