When you plug in an USB flash drive, or browse over another disk partition, you’ll see matched device icons showing on the dock panel. For those don’t like the feature, here’s how to remove (hide) these icons.
Single command to remove mounted device icons from left dock panel:
Without installing anything, you can run a single command to do the job.
Simply open terminal by pressing Ctrl+Alt+T on keyboard. When it opens, run command:
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
Without any other action, it takes effect immediately.
Graphical tool to configure the dock panel:
There’s also a graphical tool called dconf editor that allows to do the settings.
You can install dconf editor either from Ubuntu Software or by running command sudo apt install dconf-editor in terminal.
Launch dconf editor and navigate to “org/gnome/shell/extensions/dash-to-dock”, scroll down and turn off the value of “show-mounts”.