sudo apt install Dconf Editor

/ org / gnome / shell / extensions / dash-to-dock / show-mounts

false

gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false

Alt + F2

r

Enter

gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true

The mounted drive icons, like USB and other devices, can clutter Ubuntu Dock, especially when there are multiple drives or in case you have a small screen. What's more, these mounted volumes are shown in the Files app (Nautilus) anyway, so you already have a way of easily accessing them.It's worth noting that in my case, using Ubuntu 20.04 with a dual-monitor setup, the Ubuntu Dock icons disappeared from the dock on the second (non-primary) monitor. This was fixed after restarting GNOME Shell though, so if you're having this issue, restart GNOME Shell by pressing, typing, then pressing thekey. If you're on Wayland restart the session with a logout/login.