Emptying the trash or recycle bin can be done by right clicking on the icon and hitting the
empty option. Almost everybody is familiar with this behavior but not everybody knows this can also be done from the command line.
All the contents of the recycle bin is stored in one directory. We just have to clear that directory.
Open a command prompt (
Start + R to open the run window) and type
Type the command:
rd /s %systemdrive%$Recycle.bin
rd is short for “Remove Directory”. The
/s parameter takes care of removing directory and files in the directory itself.
%systemdrive% is an envrionment variable which contains the drive on which Windows is installed.
In linux the trash is stored on different locations, it might be
~/.local/share/Trash or some
.Trash directories. In the repositories there’s a package available which takes care of this task.
Install the package from the repositories:
sudo apt-get install trash-cli
Run the command: