How to Remove Trash Icon From Desktop in Ubuntu 20.04 & 18.04

Brief: This simple quick tip shows how to remove trash icon from the desktop in Ubuntu 22.04. Both graphical and command line methods have been discussed.

Starting with Ubuntu 17.10, Canonical uses a customized version of GNOME as the default desktop environment. This customized version has a resemblance to the previous default desktop environment, Unity.

While I find the new GNOME desktop quite pleasing, I don’t like one thing here and that is the trash icon on the desktop. It reminds me of the Windows XP days when there always was that recycle bin on the desktop with no direct way of removing it.

trash icon to be removed
Trash icon to be removed

Unlike previous versions, here you will find the option to hide the trash icon from the desktop in the desktop icons settings.

Remove trash icon from the desktop using Desktop Icons Settings

Go to Desktop Icon Settings from desktop right click.

01 select desktop icon settings from desktop right click
Select desktop icon settings from desktop right click

Inside the new dialog box, toggle the button for trash.

02 toggle trash button off
Toggle trash button off

That’s it. It will disappear immediately. You can toggle it again to bring back the trash icon on the desktop.

Use the command line for the same

If you prefer the command line, you can use the command below in a terminal to remove the trash icon from Ubuntu desktop.

gsettings set org.gnome.nautilus.desktop trash-icon-visible false

If you want it back, simply replace the false in the above command with true:

gsettings set org.gnome.nautilus.desktop trash-icon-visible true

Remove the trash icon from the dock in Ubuntu 22.04

Another place where you find the trash icon is in the default Ubuntu Dock on the left side. There are no options to remove this icon in default system settings.

03 trash icon in dock
Trash icon in dock

Then how do you remove the trash icon? Dconf editor and the Command line come to the rescue.

I recommend using the command line method here.

Remove the trash icon from the dock using the command line (recommended)

If you prefer the command line, you can use the command below in a terminal to remove the trash icon from the Ubuntu dock.

gsettings set org.gnome.shell.extensions.dash-to-dock show-trash false

If you want it back, simply replace the false in the above command with true:

gsettings set org.gnome.shell.extensions.dash-to-dock show-trash true

Remove the trash icon from the dock using dconf editor

The dconf editor lets you control various aspects of the GNOME desktop. However, if you wrongly clicked here and there and you may change some weird settings. This is why I don’t recommend using it.

Just search, find and install dconf editor from the software center.

install page dconf editor
Install page dconf editor

Once you have it installed, launch it by searching (press Super/Windows keys) for dconf:

dconf from overview
Dconf from overview

Once it is launched, select “i will be careful” option and continue.

dconf i will be carefull
Dconf i will be carefull option

In here, go to Org > gnome > shell > extensions > dash-to-dock and toggle the show trash button.

show trash toggle dconf
Show trash Button toggle dconf

I hope this quick tip helped you in customizing GNOME desktop on your Ubuntu system. If you know other such quick tips, please share them in the comment section.

Similar Posts

  • Nope on the command line fix. Got a return message saying:
    No such schema “org.nautilus.desktop”

  • Nice tip, thanks!
    If You want to see other things You can customize on the Gnome desktop (like hiding/showing volumes or home-icon etc.) You can enter:
    $ gsettings list-keys org.gnome.nautilus.desktop