How To Hide Mounted Drives From The Dock On Ubuntu 20.10, 20.04 Or 19.10

Mounted volumes Ubuntu 19.10

With Ubuntu 19.10, the dock shows mounted volume and device icons by default. This article explains how to disable these mounted devices from showing on the Ubuntu Dock, on Ubuntu 19.10, 20.04 and 20.10 (and newer).

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.

To hide mounted volume and device icons from the Ubuntu Dock (which is a fork of Dash to Dock), start by installing Dconf Editor:

sudo apt install Dconf Editor

Ubuntu Dock show-mounts hide mounted volume and device icons

Next open Dconf Editor, go to / org / gnome / shell / extensions / dash-to-dock / show-mounts, and set its value to false.

You may also hide mounted drives from the Ubuntu 20.10, 20.04 or 19.10 dock by using this command:

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

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 Alt + F2, typing r, then pressing the Enter key. If you're on Wayland restart the session with a logout/login.

Looking for an Ubuntu Dock alternative? Try Dash to Panel, which automatically disables Ubuntu Dock when enabled, and can be used in both horizontal and vertical panel modes.

Want to undo the changes and have mounted USB devices and other drives show up on the Ubuntu Dock? Use this command:

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