Here’s the command. Just paste this line into your Terminal, and press return.
defaults write com.apple.screencapture disable-shadow -bool true killall SystemUIServer
To test out your new screenshot settings, just take a quick screenshot by pressing the key combination command-shift-4, followed by the spacebar. You should end up with a beautifully clean window screenshot, free of drop shadows. The best part about this is that your screenshot’s dimensions will now finally match the window’s dimensions, without all that added padding introduced by the drop shadow. Nice, huh?
If you no longer want these cleaned up windows, you can switch back to the normal shadowed screenshots by pasting the following into your Terminal:
defaults write com.apple.screencapture disable-shadow -bool false killall SystemUIServer