How-to Solve - Trash can't be opened right now because it's being used by another task

photo of author
stealth

The other day I met her the problem with emptying the trash (Trash) on macOS Catalina. After doing some tests I found that this problem also occurs on macOS Big Sur if error-specific scenarios are created "Trash can't be opened right now because it's being used by another task".

Basically, the user cannot empty the trash on Mac (Empty Trash), Even if some files in it are deleted, it cannot be completely emptied. Files or folders remain "hanging" somewhere in a task.

“.Trash” can’t be opened right now because it’s being used by another task, such as moving or copying an item or emptying the Trash. Try again when de current task is complete. with the "Skip", "Stop" or "Continue" options.

As the error message says, "Trash" is engaged in another operation, and the files inside it cannot be deleted.
In our case the problem arose when I deleted a folder from iCloud Drive. The folder was moved to Trash but he it was not fully downloaded on the Mac. For this reason, the garbage code could not be emptied.

But there are also scenarios in which although Trash seems empty, the option Empty Trash remains active, and the icon indicates that we have files waiting to be deleted. Although we don't see them.
In this case, we will have to go to the system files at the root Trash folders and we delete them manually.

Operating System macOS uses two different roots for the Trash folder. One root is located on the local hard drive and the other is in iCloud Drive and is intended for files deleted from iCloud. The two are synchronized in Trash.

The solution to the problem is to manually delete the files from the two Trash roots.

1. Go to “Finder” → “Go” → “Go to Folder…” and choose path:

~/.Trash

2. The location we get to is the root of the basket and the local garbage. From the hard drive. We manually delete all the contents of this folder.

3. Go to the root of the Trash folder in iCloud Drive:

~/Library/Mobile Documents/com~apple~clouddocs/.Trash

4. Delete all files in the ".Trash" folder, including the ".DS_Store"

If you manually delete from "Finder” does not work, the command line is executed in the Terminal:

sudo rm -rf ~/Library/Mobile\ Documents/com~apple~clouddocs/.Trash

Restart the operating system, and the Trash icon will no longer show items in the trash.

I am happy to share my experiences in the field of computers, mobile phones and operating systems, to develop web projects and to bring the most useful tutorials and advice. I like to "play" on the iPhone, MacBook Pro, iPad, AirPort Extreme and on operating systems macOS, iOS, Android and Windows.

1 thought on "How-to Solve – Trash can't be opened right now because it's being used by another task"

Leave a Comment