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
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)
enock@enock-pc:~/.local/share/Trash$ rm -rf *
enock@enock-pc:~$ rm -rf ~/.local/share/Trash/files/*
enock@enock-pc:~$ 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.