At first glance, it may seem that there is nothing easier than emptying the Recycle Bin in the Linux operating system. However, beginners may have some difficulties at first. For example, you may have downloaded a file with an obscure extension, tried to delete it, but it is not deleted. In this case, the system gives an error. Let's consider the way of cleaning the recycle garbage can with unnecessary files on the example of KDE and Gnome managers.
Gnome shell uses Nautilus utility, which looks like Dolphin:
You don't have to put any serious effort into it. Just right-click and select empty recycle garbage can at the bottom:
Confirm the need to empty the trash. Agree with the deletion of unnecessary files. Rejoice at the positive result of the operation.
To do this, you need to use Dolphin as a file manager in the KDE desktop environment. This is what its main window looks like, and here is the Recycle Bin:
Now right-click on the item and click on the "Empty Recycle Bin" item that appears:
Finally confirm the action:
Now the cart is empty, and there is even more free space in the system.
In practice, there are cases when a file has an unsupported encoding, or the user does not have enough rights to delete files. In this case, the task of emptying the Recycle Bin cannot be performed. However, there are still ways to solve this problem. Here is one of them.
Open a terminal using Ctrl+Alt+T
and type the command:
$ sudo rm -rf ~/.Trash/*
Sometimes the Recycle Bin is located in the ~/.local/share
folder:
$ sudo rm -Rf ~/.local/share/Trash
The Recycle Bin can be located anywhere, it depends on your system settings, you can find the folder with the Recycle Bin with the command:
$ find ~/ -name Trash
At the end of the operation to remove files from the Recycle Bin, substitute the result into rm
, but be careful not to delete important files that may be there.