How to Prevent Mac Spaces from Rearranging Themselves

One of my favorite macOS features is the ability to add multiple virtual desktops. This allows for comfortable multi-app work and easy switching between them using multi-touch gestures.

By default, macOS automatically rearranges the virtual desktop (spaces) based on recent app usage. If you, like me, have arranged everything in a specific order, this feature can be very inconvenient.

Prefer written instructions? No worries, I have got you covered.

  1. Open System Settings.
  1. Select Desktop & Dock in the left side.
  2. Scroll down and, under Mission Control, turn off the toggle for the Automatically rearrange Spaces based on most recent use option.

In older macOS versions like Big Sur or Catalina, this option is in Mission Control in System Preferences.

If you are a web developer like me, you would love to disable it with a code. Well, yes, you can do that as well.

Open Terminal and copy/paste the following code and press Enter to disable spaces rearrangement:

defaults write com.apple.dock "mru-spaces" -bool "false" && killall Dock

Easy-peasy, isn’t it? Got any questions? Feel free to ask me!

About the Author

Muhammad Qasim

Muhammad Qasim

Muhammad Qasim is an Electrical Engineer, Solo Entrepreneur, and Web Developer who loves troubleshooting gadgets and making cool things for the internet.

You can contact him on Email, LinkedIn, Twitter, or GitHub.

Leave a Comment