How to remove Macintosh HD from desktop?

Solution 1:

Go to Finder's preferences and on its General tab under "Show these items on the desktop:", uncheck: Hard disks

Finder's preferences

Solution 2:

You can remove all icons from you desktop by typing

defaults write com.apple.finder CreateDesktop false
killall Finder

in the terminal. This gives you a clean desktop.

Typing

defaults write com.apple.finder CreateDesktop true
killall Finder

retuns the items to you desktop.