Why is there a Dashboard Space in Sonoma? How to erase it?

Hi all, I am working on macOS 14.4.1 and I am having an issue with the Desktop Spaces feature. Calling

defaults read com.apple.spaces.plist

gives me a list of all current spaces, which reports the existence of a phantom Space that cannot be seen nor interacted with. The ID of that Space leads me to the following:

which shows that space 23 is associated with the Dashboard feature, that does not exist in Sonoma!

I have tried to:

  • restart the computer,
  • forcefully disable the dashboard with
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock

Neither attempt erased the phantom Space, which creates conflicts in my setup.

I have tried completely disabling Widgets in the Preferences, closing all apps, deleting every space (including the "current" one, by creating a new one to substitute it) and restarting the Mac. After this, the id of the dashboard space changed:

but it is still there. I do not know which step changed its id, because to my knowledge the com.apple.spaces.plist file takes a while to be updated (https://apple.stackexchange.com/questions/388449). But no hints on how to erase it.

The specific issues I am having are that this phantom space prevents any software that reads the Spaces state, to save it, from working correctly (e.g. DisplayMaid, Workspaces). In particular, I am now developing a Hammerspoon (https://www.hammerspoon.org/) module to do just that, to set it precisely to my liking: https://github.com/tplobo/restore-spaces. Listing the spaces to cycle through them always reports this phantom space, and since it cannot be identified as the "non-existing" one (up until the time it breaks one of the Lua commands that manage spaces), I am unable to exclude it somehow to continue development.

Is there a command to restart the Spaces feature, to completely erase all spaces and check if this removes this phantom Space? Otherwise, any alternative suggestions? I have already posted this in the standard forum, but no luck there.

Thank you,

I don’t have answers for you here, but I want to be clear about two things:

  • Unless specifically documented otherwise, Apple’s use of UserDefaults is an implementation detail, not an API. If you use defaults to manipulate such preferences directly, you are likely to encounter weird compatibility problems going forward (as you’ve described here). It’s better to stick with supported APIs.

  • Sadly, there’s no supported API to manipulate spaces. If you’d like to see such support added in the future, I encourage you to file an enhancement request describing your requirements. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Why is there a Dashboard Space in Sonoma? How to erase it?
 
 
Q