Remove HDD icon from dock in 20.04 [duplicate]

Open dconf Editor.

If dconf Editor is not on your system, do:

sudo apt update

sudo apt install dconf-editor

Adjust the following setting...

enter image description here