How do I remove trash icon from GNOME desktop?

30,624

Solution 1

Up to Ubuntu 18.10

You may use (GNOME) Tweaks (aka GNOME Tweak Tool) to do that. First install it (if it is not installed) by running the following command in Terminal

sudo apt install gnome-tweaks

or

sudo apt install gnome-tweak-tool

Launch Tweaks and go to Desktop section. Then toggle off (or uncheck) the Trash (or Rubbish bin or Wastebasket) option under "Icons on Desktop".

enter image description here

Alternatively you may run the following command in Terminal:

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

Solution 2

After following Exien's answer on Ubuntu 20.04, the GUI became extremely slow and unresponsive. I had to reinstall Ubuntu even after reverting the value to true which did not fix the problem it generates.

In Ubuntu 20.04

It is actually easy:

  1. Search for Extensions (preinstalled) in the Activities overview.

    Search for Extensions (comes installed ready)

  2. Click on the Settings gear icon next to the Desktop Icons toggle

    Click on the settings gear icon next to the Desktop Icons toggle

  3. Toggle icons as required

    Toggle icons as required

Solution 3

Ubuntu 19.04 and later

The following terminal command works:

gsettings set org.gnome.shell.extensions.desktop-icons show-trash false
Share:
30,624

Related videos on Youtube

joshas
Author by

joshas

Updated on September 18, 2022

Comments

  • joshas
    joshas over 1 year

    How do I remove the "Trash" icon from GNOME 3 desktop? I'm running Ubuntu 17.10 with GNOME shell.

  • Videonauth
    Videonauth over 6 years
    Just tested it in a VM. Works as advertised. Tested the GUI solution with tweak tools and the command line solution.
  • Brett Beatty
    Brett Beatty almost 6 years
    Can also confirm the terminal command works as advertised
  • Tomislav Nakic-Alfirevic
    Tomislav Nakic-Alfirevic over 4 years
    For the CLI-oriented, the command is gnome-tweaks.
  • pomsky
    pomsky over 4 years
    @tomislav They're the same thing.
  • Tomislav Nakic-Alfirevic
    Tomislav Nakic-Alfirevic over 4 years
    @pomsky Yes, just thought if anyone wants to start it from the CLI, that's the name.
  • Scott Stensland
    Scott Stensland over 4 years
    on 19.10 tab Desktop no longer appears ... instead in tweaks hit Extensions -> wrench on Desktop icons and switch off trash
  • pomsky
    pomsky over 4 years
    @scott Yes, because the way desktop icons are handled is changed fundamentally (handler changed from Nautilus to a shell extension), and this is the case since Ubuntu 19.04.
  • pomsky
    pomsky almost 4 years
    It's probably just a red herring; your issues may have appeared coincidentally after running the command, but most likely only the command itself is not the cause. Running the command does (under the hood) exactly what toggling off in the Extensions app does.
  • Nav
    Nav almost 3 years
    Thank you for this. It's annoying that the developers didn't just provide this option in the properties menu of the icon or in a more accessible place in settings