1) Press ALT+F2 and type in the dialog: gconf-editor + enter
2) In the editor, navigate to apps/nautilus/desktop and on the rigt hand pane check the "trash_icon_visible" checkbox
If it's the panel icon:
Right click on the panel, select "Add to panel", select trash (or something similar to that... sorry, can't remember the exact name, I'm translating from a spanish install).
Desktop icons, including the Trash icon, have been disabled in Ubuntu 19.04 and later. To add them back install the Desktop Icons GNOME shell extension from Ubuntu Software.
This might happen when you were re-adjusting your desktop icons and you forgot to enable Keep aligned.
Just enable it and you will see the desktop Trash Icon. There is no way you could have deleted or removed it since there is no option to remove or delete it when you select it and right-click on it.
For KDE (if you're using Kubuntu = KDE + Ubuntu), open Dolphin (file manager) and find the "Trash" folder in the "Places" panel on the left. Drag-and-drop the Trash folder from Dolphin to the Desktop to create a new Trash icon (it will have the expected "Empty Trash" functionality). You can do the same with "Home" and other folders too.
You can also empty the trash using Dolphin by right clicking on the "Trash" folder in the Places Panel. If the "Places" panel is not visible then press F9 or select View -> Show Panels -> Places.
Using the graphical tool GConf Editor :
Alt+F2, type
gconf-editor
and click Run.Navigate to apps ➜ nautilus ➜ desktop and check the
trash_icon_visible
checkbox.From the Command Line :
EDIT ~ UPDATE
In later systems GConf Editor/gconftool is outdated and the settings are not there.
Using Dconf Editor:
org > gnome > nautilus > desktop
If it's a desktop icon:
1) Press ALT+F2 and type in the dialog: gconf-editor + enter
2) In the editor, navigate to apps/nautilus/desktop and on the rigt hand pane check the "trash_icon_visible" checkbox
If it's the panel icon:
Right click on the panel, select "Add to panel", select trash (or something similar to that... sorry, can't remember the exact name, I'm translating from a spanish install).
Desktop icons, including the Trash icon, have been disabled in Ubuntu 19.04 and later. To add them back install the Desktop Icons GNOME shell extension from Ubuntu Software.
If you put the trash icon in the trash just open any file manager window (nautilus) and select Go -> Trash from there you can restore the icon.
This might happen when you were re-adjusting your desktop icons and you forgot to enable Keep aligned.
Just enable it and you will see the desktop Trash Icon. There is no way you could have deleted or removed it since there is no option to remove or delete it when you select it and right-click on it.
For KDE (if you're using Kubuntu = KDE + Ubuntu), open Dolphin (file manager) and find the "Trash" folder in the "Places" panel on the left. Drag-and-drop the Trash folder from Dolphin to the Desktop to create a new Trash icon (it will have the expected "Empty Trash" functionality). You can do the same with "Home" and other folders too.
You can also empty the trash using Dolphin by right clicking on the "Trash" folder in the Places Panel. If the "Places" panel is not visible then press F9 or select View -> Show Panels -> Places.