Some Linux and Unix desktop environments include a Trash folder that works like the Windows Recycle Bin. When you delete a file from the desktop environment, it goes into the Trash folder. If you later realise that you deleted the file in error, you can restore it to its original folder. If you cannot delete the contents of the Trash folder through the graphical interface, you can locate the file through the command line and forcefully empty the directory as the root user.
- Skill level:
Other People Are Reading
Open a terminal window. The terminal can be found under the Applications menu or by right-clicking on the desktop. The window should open with a command prompt in your home directory.
Type the command "find . -name "*Trash" to locate the Trash directory. The Trash directory is usually found at "/home/user/.Trash" or "/home/user/.local/share/Trash", depending on the distribution and desktop environment you are using. Replace "user" with your user name.
Type the command "cd .Trash/" to navigate into the Trash directory. Replace ".Trash/" with the directory found in the output from the find command in the previous step.
Type the command "su -" to become the root user. Type the root password when prompted. Ubuntu and Linux Mint users type the command "sudo" before the next command and skip this step.
Type the command "rm -rf *" to remove all the files and folders within the directory.
Type the command "exit" to close the root session. Skip this step if you are using a Ubuntu or Linux Mint system.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for