macOS has a fantastic built-in screenshot utility. If you press Command + Shift + 4, and then press the Spacebar, your cursor turns into a camera icon. Clicking on any application window will capture a perfectly cropped, transparent PNG image of just that specific window.
However, Apple intentionally bakes a massive, sprawling drop shadow into the resulting image file. While this looks highly stylized and aesthetically pleasing when pasted into a slideshow, it is a nightmare for web developers, technical writers, and designers. The drop shadow adds a massive amount of unnecessary transparent padding to the file, making the image difficult to align in a blog post and needlessly increasing the file size.
You can permanently disable this drop shadow effect across the entire operating system using a hidden Terminal command.
Step 1: Disable the Shadows via Terminal
We will use the defaults command to modify a hidden preference file belonging to the screencapture daemon.
- Open the Terminal app (found in Applications > Utilities, or via Spotlight search).
- Copy and paste the following command exactly as written:
defaults write com.apple.screencapture disable-shadow -bool true - Press Return.
Step 2: Restart the SystemUIServer
Although you have updated the preference file, macOS will not recognize the change until the graphical interface server is restarted. You do not need to reboot your whole Mac; you just need to kill this specific background process.
- In the Terminal, type the following command:
killall SystemUIServer - Press Return.
Your menu bar icons might briefly disappear and reappear as the server restarts. This is perfectly normal and takes less than a second.
Testing the Clean Screenshots
Your screenshots are now permanently shadow-free.
- Open any app window, like Safari or Notes.
- Press Command + Shift + 4.
- Press the Spacebar.
- Click the app window to take the screenshot.
Open the resulting image file saved to your desktop. You will see a perfectly cropped image that ends exactly at the border of the application, with no transparent padding and no drop shadow.
How to Bring the Shadows Back
If you later decide you want the stylized shadows for a specific project, reversing the command is incredibly simple.
- Open the Terminal.
- Paste the following command to restore the default setting:
defaults write com.apple.screencapture disable-shadow -bool false - Press Return.
- Restart the server again:
killall SystemUIServer
Your screenshots will immediately return to their default, shadowed state.