How do I remove trash icon from GNOME desktop?
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".
Alternatively you may run the following command in Terminal:
gsettings set org.gnome.nautilus.desktop trash-icon-visible false
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:
Search for Extensions (preinstalled) in the Activities overview.
Click on the Settings gear icon next to the Desktop Icons toggle
Toggle icons as required
Ubuntu 19.04 and later
The following terminal command works:
gsettings set org.gnome.shell.extensions.desktop-icons show-trash false