How to Clean the Trash Bin in Ubuntu

Ben
Ben
@benjislab

Managing the trash bin in Ubuntu is an essential skill for maintaining a clean and efficient computer system. This guide will walk you through the steps to manage and clean the trash bin in Ubuntu, helping you free up space and keep your system organized.

Accessing the Trash Bin

The trash bin in Ubuntu can be accessed through the graphical user interface (GUI). Simply click on the trash icon usually located on the launcher or the desktop. This will open the trash bin folder where all your deleted files are temporarily stored.

Reviewing Files Before Deletion

Before permanently deleting files, it’s a good practice to review them. This ensures that you don’t accidentally remove files that you might need later. You can open, move, or restore files from the trash if you realize that they were deleted by mistake.

Emptying the Trash Bin

To clean your trash bin in Ubuntu, you have a couple of options:

  • Empty the entire trash: Right-click on the trash icon and select "Empty Trash." This will permanently delete all files contained within the trash bin.
  • Selectively delete files: Open the trash bin, select the files you wish to delete permanently, right-click on them, and choose "Delete Permanently."

Using Terminal Commands

For those who prefer using the terminal, or for automating the process, Ubuntu allows you to manage the trash via command line. Here's how:

  • To empty the trash via terminal, you can use the command:
rm  -rf ~/.local/share/Trash/*