Hello Guys, As you and I always say and we will continue to say. “The command line is power” yes the command line is really power even more.
Today am going to share with you a command line skill of emptying Trash in Ubuntu. I have not tried it on other distros. If it works, good.
Launch Terminal (ctrl + alt + t).
In your home directory from the time. Run the command below:
$ cd /.local/share/Trash
[email protected]:~/.local/share/Trash$ ls
First of all all these directories perform a special function in the background which GUI Trash doesn’t show you.
Now assuming I have deleted a file or folder it will currently be located in files.
Now since we know all that are in Trash now is what we want remove, we can quickly run the command below to remove everything (including all those three directories)
[email protected]:~/.local/share/Trash$ rm -rf *
[email protected]:~$ rm -rf ~/.local/share/Trash/files/*
[email protected]:~$ rm -rf ~/.local/share/Trash/*
But Note: These three directories are system directories so they will always be available anytime you push something to Trash. You can verify by repeating the steps treated earlier after moving something to Trash.