How to Remove Trash Icon From Desktop in Ubuntu

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

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.

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.

15 Simple Tips to Customize Ubuntu GNOME
Some basic and interesting GNOME customization tips for enriching your experience and getting more out of your Ubuntu desktop.

If you know other such quick tips, please share them in the comment section.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries ๐Ÿ•ต๏ธโ€โ™‚๏ธ

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! Youโ€™ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.