Hide Desktop icons on MacOS


Useful when you need to record product demo, take nice screenshots. Run the following scripts in terminal to hide/unhide icons.

To Hide:

defaults write com.apple.finder CreateDesktop false killall Finder

To Unhide:

defaults write com.apple.finder CreateDesktop true killall Finder