Starting from Ubuntu 18.04 LTS, the OS now shows the Trash icon on the desktop. However, many users prefer having a cleaner desktop with nothing but the wallpaper on the desktop. First of all, let’s make it clear that putting the trash icon on the desktop does make sense. Although, one could argue that the Ubuntu dock would have been a much better place for the trash icon. Ubuntu 18.04 LTS only shows a trash icon by default, but later versions also put a Home folder icon on the desktop.
The good news is that both the trash icon and the home folder are easy to remove from the desktop. As is often the case with Linux operating systems, there are multiple ways to do this. A simple way is to copy and paste a single command. You can also go the GUI route but you need to install the GNOME Tweaks app. You can enjoy a better experience with these 5 tips to speed up your GNOME desktop.
Using the GNOME Tweak Tool
GNOME Tweak Tool is one of the first apps anyone would recommend you to install on a new Ubuntu system. Even if you don’t want to install icon packs and themes, the Tweak tool has many little and nifty options that make life with Ubuntu much easier. So if you haven’t installed it yet, you should probably do so now while you’re at it.
First, make sure you have enabled the universe repository from the Software & Updates app. To install it, copy and paste the command below in Terminal or search for it in the Software Center.
sudo apt install gnome-tweak-tool
Once the GNOME Tweak tool is installed, follow the instructions below to remove the trash icon from the desktop.
- Open the GNOME Tweak Tool.
- Navigate to the Extensions section from the left column.Â
- Click the cog icon next to the Desktop Icons toggle.
- Toggle off Show the wastebasket icon on the desktop.
- Similarly, to remove the home folder icon, toggle off Show the personal folder on the desktop.
For Ubuntu 18.04 and earlier, go to Desktop in the GNOME Tweak Tool, and turn off the toggle next to Trash.
Using the Command line
As mentioned earlier, you can also do this multi-step process in a single step. If you’re using Ubuntu 18.04 or earlier, copy and paste the following command into a terminal and hit enter.
gsettings set org.gnome.nautilus.desktop trash-icon-visible false
To remove the trash icon from the desktop in Ubuntu 19.10 or later, use the command below.
gsettings set org.gnome.shell.extensions.desktop-icons show-trash false
The home folder can also be similarly removed with the following command.
gsettings set org.gnome.shell.extensions.desktop-icons show-home false
Regardless of which method you choose between the GNOME Tweak Tool or the command line, the changes are immediate. Once you’ve executed the command or turned off the toggle, you will no longer see the trash icon on the desktop.
Restoring Trash Icon on Ubuntu
You can have the icons back by turning the toggle back on in the GNOME Tweak Tool. If you prefer the command line method, you can get the icons back by executing the same command but switching false to true. For instance,
gsettings set org.gnome.shell.extensions.desktop-icons show-trash false
becomes
gsettings set org.gnome.shell.extensions.desktop-icons show-trash true
That was all about adding and removing the trash icon from the desktop in Ubuntu. Before you leave, do not forget to check out our tutorial on backing up and restoring Linux.