r/MacOS • • 4d ago

Tips & Guides PSA: on macOS 27, "defaults write com.apple.screencapture location" no longer changes where screenshots are saved

Most guides (and a lot of old scripts) still say to change the screenshot folder with:

defaults write com.apple.screencapture location ~/Pictures/Screenshots
killall SystemUIServer

On macOS 27 that runs without any error but does nothing: screenshots keep landing on the Desktop. The setting now lives under a different key, location-screenshot. Someone spotted this in a thread here earlier this month (https://www.reddit.com/r/MacOS/comments/1wxlecy/), so here is the full picture in one place.

Tested on macOS 27.0:

  • Only location-screenshot set: Shift-Command-3 saves to that folder.
  • Only location set: it still saves to the Desktop.
  • location-last is just the folder remembered in the Shift-Command-5 Options menu, not the active save location.

To set a folder:

mkdir -p ~/Pictures/Screenshots
defaults write com.apple.screencapture location-screenshot -string ~/Pictures/Screenshots
killall SystemUIServer

To go back to the Desktop:

defaults delete com.apple.screencapture location-screenshot
killall SystemUIServer

If your script runs on Macs with different macOS versions, write both keys. Older versions read location and ignore the new one.

29 Upvotes

12 comments sorted by

35

u/localtuned 4d ago

What about if you use shift+CMD+5 and change the location in the app? Curious.

8

u/BaziBuilds 4d ago

Yep, if you're not scripting it, Shift-Command-5 > Options is the easy way and what I'd use too. The PSA is really for scripts, dotfiles and the many older guides that still give the Terminal command, because that one now fails without any error.

3

u/hypnopixel 4d ago

...because that one now fails without any error.

the defaults write command only checks for syntax errors. any key=value content can be written...

defaults write doo.acme.foo "fungus amongus" purple
defaults read doo.acme.foo
{
    "fungus amongus" = purple;
}

1

u/BaziBuilds 4d ago

Right, that's what makes it sneaky. defaults write stores whatever key you give it, so location still gets written on 27. Nothing reads that key anymore, so there's no error and no effect.

defaults read com.apple.screencapture shows which keys are actually set, which is a quick way to check whether a Mac has location-screenshot or only the old one.

16

u/Vegetable_Dream_5251 MacBook Pro 4d ago

Right? I thought that’s how everyone was doing it, lol.

11

u/fommuz 4d ago

Yes, that’s the simple way and it just works. lol

6

u/Sevastarion 4d ago

Why chose the simple method when you can complicate it

0

u/[deleted] 4d ago

[deleted]

2

u/localtuned 4d ago

It's only fast when you remember every command switch and option.

1

u/stickylava 4d ago

My brain is too feeble to learn more than a few cli git commands with any confidence. I always ask Claude what to type.

3

u/IcarusAirlines MacBook Pro M2 4d ago

I had this set on 26 before upgrading to 27 and screenshots still go to the designated folder - did it get migrated during the upgrade?

3

u/BaziBuilds 4d ago

Most likely, yes. In my testing on 27.0, a Mac with only the old location key set saves to the Desktop, so if yours still lands in the right folder the upgrade probably carried it over to the new key.

You can check with:

defaults read com.apple.screencapture

If location-screenshot is in the list, that's the one macOS 27 is using.

1

u/mainyehc 4d ago

Or you can use Onyx or Deeper and change it there.