This simple tutorial shows how to remove the trash icon from the dock in Ubuntu 24.04 Noble Numbat.
Different to the previous releases, Ubuntu 24.04 puts the trash icon on left dock instead of the desktop. However, I don’t use the trash icon in either location. Instead, I removes files using right-click menu options, and go to trash via file manager left sidebar.
If you also find it useless, then here’s how to remove it either via a single command or by a graphical configuration tool.
Single command to remove Trash from the dock:
Press Ctrl+Alt+T key combination on keyboard to open terminal. When it opens, run the command below will tell Ubuntu Dock to hide the trash icon:
gsettings set org.gnome.shell.extensions.dash-to-dock show-trash false
(Optional) The command takes effect immediately. If you change your mind and want to revert it back. Use command:
gsettings reset org.gnome.shell.extensions.dash-to-dock show-trash
Hide Trash Icon using “Settings”:
Since Ubuntu 22.04, System ‘Settings’ (aka Gnome Control Center) has an option to toggle display the icons on left dock.
First, click on top-right corner system tray icon to open ‘Settings‘.
When it opens, navigate to “Ubuntu Desktop” in the left pane, then scroll down in right and click on “Configure dock behavior“. In the pop-up dialog, you’ll see the option to turn on/off ‘Trash’, as well as mounted volumes/usb disk, etc.
Hide Trash Icon using Dconf Editor:
For beginners and/or those hate Linux commands, an advanced graphical configuration tool “Dconf Editor” is present to do the job.
First, search for install “Dconf Editor” from Ubuntu Software if you don’t have it:
Next, search for and launch the tool from activities overview screen. When it opens, click on “I’ll be careful” button, and then navigate to “org/gnome/shell/extensions/dash-to-dock“.
There you’ll see all the settings for Ubuntu Dock. Scroll down and toggle off the slider icon for “show-trash” will do the trick.
That’s it. Enjoy!
An alternative if you face “No such schema “org.gnome.shell.extensions.dash-to-dock””
“`
dconf write /org/gnome/shell/extensions/dash-to-dock/show-trash false
“`
TY
TY TY you are very helpful on Ubuntu