How to fix errors cannot clean up Trash on Mac
Normally, cleaning up the Trash folder on a Mac is quick and easy. Just open the folder and click the Empty button in the upper right corner. It's done!
However, there are cases where Trash does not allow users to permanently delete certain files for various reasons.
This tutorial will show you how to deal with such cases. The article will show how to check if the file is being used or locked. The article will also look at how to perform disk repair in case there is a drive-related problem preventing the user from cleaning up the Trash. And finally, we will consider how to use Terminal to force Trash to clean up.
Cannot empty Trash on Mac? This is how to fix it
- How to clean up Trash on Mac when the file is still in use
- How to fix problems using advanced files
- How to clean up Trash when the file is locked
- How to clean up Trash when there is a problem with the drive
- How to force Trash to clean up
How to clean up Trash on Mac when the file is still in use
Usually, Trash is not empty because certain internal files are still in use.
Another application, or some kind of process that works in the background, may be using them. Users will know this by a popup window that will indicate something like ' The operation cannot be completed because the item is in use. '(The operation has not been completed because this item is in use).
This means that users will have to close the file before it can be permanently deleted. For example, if the item is a Word document, the user will have to close it in Word. If it is an application, the user will have to exit the application.
Sometimes users may not be able to determine exactly where the file is opened. In these cases, perhaps a process running in the background is using it. To check if this is the case, restart your Mac and try to delete the file again. If a background process is using it, then this time the user will be able to delete the file in Trash.
How to fix problems using advanced files
In addition, a boot or log entry may be using the requested file to delete. Users can fix this by starting a Mac in Safe Mode. This prevents some software from starting automatically.
To boot the Mac in Safe Mode and clean up Trash, do the following:
1. Turn off the Mac.
2. Turn on the Mac and hold down the Shift key immediately.
3. Once booted into Safe Mode, open Trash.
4. Click the Empty button (in the upper right corner).
This will delete the file if the boot application is in use. If not, there is another option to use Terminal to check which application has the file locked. Do the following:
1. Open Trash.
2. Press Cmd + Space to launch Spotlight.
3. Enter Terminal and press Return.
4. Enter lsof and press Space. This command will list open and display the list of files used with the processes that opened them.
5. Return to Trash and drag the file you want to delete into Terminal.
6. Press Return to run the command.
This command will give a list of applications that use the file.
Close all applications in the list above (note that the Terminal may not provide the full name of the application). For example, in the screenshot above, the Microsoft Word listing command is Microsoft 1839 . Therefore, users may have to try to close a number of different applications.
How to clean up Trash when the file is locked
In other cases, files that are trying to delete may be locked. Users can easily fix this by going to Trash and unlocking them. Here's what to do:
1. Open Trash.
2. Right-click the file you want to delete.
3. Click Get Info .
4. Click the Locked checkbox .
The files will be unlocked and can be deleted by clicking the Empty button . In addition, the user can right-click the file and select Delete Immediately.
How to clean up Trash when there is a problem with the drive
The problem of hard drive failure can prevent Trash from being cleaned up. You can check the drive by launching Disk Utility and using the First Aid function .
Follow these instructions to complete the process:
1. Press Cmd + Space to launch Spotlight.
2. Enter Disk Utility and press Return.
3. Select the hard drive name. Make sure the drive contains the file you want to delete.
4. Click First Aid, then select Run.
The First Aid function will indicate if it finds any errors, but it cannot fix the problem on the main drive while the drive is running. Users will need to restart the Mac in Recovery Mode to fix the problem on the boot drive.
Fixing a Mac drive is an option worth considering when something goes wrong and other steps don't work. In most cases, fixing the drive will allow to permanently delete items in Trash.
However, if the problem with the drive is not at the root of the problem, the user needs to force Trash to clean up.
How to force Trash to clean up
There are several ways to force Trash clean up. If a file is locked and can be unlocked, users can try deleting it while holding the Option key . Hold down the Option key while clicking the Empty button .
This is quite useful if the Mac doesn't allow any files to be unlocked.
One final option is to use the Terminal command to force Trash to be emptied. This option overrides any key on files and deletes files that are still in use. It also fixes any other errors that prevent Trash from being cleaned up.
Thus, using the Terminal command is an effective way to permanently delete files. However, it is possible that macOS is preventing users from deleting files for a good reason. Users can inadvertently give something important, make a certain application work, go to Trash.
Therefore, use caution when using the method described below:
1. Press Cmd + Space to open Spotlight.
2. Type Terminal and press Return to launch it.
3. Enter sudo rm -R and press Space. This is a command to force deleting files.
4. Return to Trash and drag the files you want to delete into the Terminal window.
5. Press Return.
6. Enter admin password to authorize the command. Password will not be displayed when user enters for security reasons.
7. Click Return to confirm and run the command.
This command will immediately delete the newly dragged file into the Terminal window. Finally, users can be assured that their Mac has been a bit 'cleaner'.
Trash cleanup is a good way to keep your Mac clean and free of clutter. It saves disk space and helps your Mac run more smoothly.
Hope you are succesful.
You should read it
- How to delete trash automatically on Mac
- How to recover deleted files permanently in the trash
- How to Delete Photos on a Mac Computer
- How to clean up iPhone trash to increase capacity
- The most effective way to clean up computer and laptop trash that anyone can do
- How to create trash for Android with Dumpster
- Discover infrared sensor technology on automatic trash
- How to recover deleted files on macOS
May be interested
- Discover infrared sensor technology on automatic trashequipped with infrared sensor technology, automatic trash has brought many benefits to users.
- 7 simple steps to make your laptop as clean as newhere are 7 basic steps you need to take when cleaning your laptop. you should check the manufacturer's user manual for more details on how to disassemble specific parts on a laptop.
- How to use Clean Master to clean up, speed up Windowsclean master has a version on windows pc with features to clean up the system, speed up the computer similar to ccleaner.
- How to Clean Game Discsgame consoles often cannot recognize and read dirty game discs. dirt, lint, and fingerprints on the disk can even cause system errors. when cleaning discs, you should always clean in the gentlest way first, as the same dirt and scratch removal methods can cause more damage if overused. if the game still doesn't run, try stronger cleaning methods one at a time. in addition, cleaning the player is also a good idea, especially if you constantly encounter errors with many different games.
- How to recover deleted files on macOSthe trash area on macos is the place to store deleted files from the folder on the computer. and if the user needs to retrieve the file, he can search here.
- How to fix typed keyboard errors when entering contentdisordered keyboard error will greatly affect your input of word text content, texting on facebook, chat on zalo pc, ... so how can i fix the keyboard errors are illiterate?
- How to add trash to permanently delete files on Windows 10/11do you want a recycle bin on your windows 10 or 11 desktop that actually deletes files that are dragged into it and cannot be recovered? the good news is that you can do this using free file wiper and multi trash.
- Delete files on Mac directly without the Trash trashon windows operating systems, you can delete files permanently by pressing and holding the shift key. however, this is not available on mac. and wait until os x 10.11 el capitan mac users can use this feature.
- How to clean curtainscurtains are often overlooked in daily cleaning because of their bulky size, but they actually need to be cleaned regularly. here is the quickest and simplest way to clean curtains.
- How to implement Clean Boot on Windows 10/8/7clean boot state is used to diagnose and fix problems on windows. if your computer cannot start normally or if during the boot process you receive an error message, then you might consider performing a clean boot.