According to this page,
To hide your Mac desktop icons, for example:
- Launch Terminal from Applications ➙ Utilities
- Type defaults write com.apple.finder CreateDesktop false
- Press Enter
- Now restart Finder by typing killall Finder and hitting Enter once again
For the recovery, change “false” to “true.”