Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BigBlur

macrumors 65816
Original poster
Jul 9, 2021
1,137
1,500
I'm trying to reset my the app icons in my Launchpad to the default order, but the command doesn't seem to be working anymore. Did it change? Is it a bug? I'm running Sequoia 15.2.

defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
 
Terminal already had Full Disk Access. I've used the same command in Sonoma and it worked, now it's not. I also just tried creating a new user, rearranging the icons, and resetting it. It didn't work for that user either.

I verified it's writing the 'ResetLaunchPad' key to the com.apple.dock.plist file as well. It's as if the Dock process isn't reading it or taking action when it relaunches.
 
I don't have 15.2 to test, but the command definitely works in 15.1.1.
Here is another way:

Code:
sudo find 2>/dev/null /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} +; killall Dock

It searches for the folder that stores the Launchpad databases and deletes it.
 
  • Like
Reactions: mindfury and shafez
Thanks, that second one partially worked. It reset the first page with all the Apple apps, but the pages with third party apps were left untouched. They did not get reset to alphabetical order.

Now that I think about it, I did run the first command after upgrading to 15.0 and it worked then too. (I wanted to get the new Screen Mirroring and Passwords app icons into their default location.) I'm thinking it may be a bug in 15.2.
 
This worked fine all the way up to 15.2 where it broke.

I don't have 15.2 to test, but the command definitely works in 15.1.1.
Here is another way:

Code:
sudo find 2>/dev/null /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} +; killall Dock

It searches for the folder that stores the Launchpad databases and deletes it.
This worked for me on 15.2 for all pages!
 
  • Like
Reactions: NervousFish2
Hi folks. I've solved this by making a long-form script and turning it into an automator app, using the script provided by bogdanw:
I don't have 15.2 to test, but the command definitely works in 15.1.1.
Here is another way:

Code:
sudo find 2>/dev/null /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} +; killall Dock

It searches for the folder that stores the Launchpad databases and deletes it.

Automator script:
Code:
#!/bin/zsh

# Prompt for the password using AppleScript
PASSWORD=$(osascript -e 'Tell application "System Events" to display dialog "Enter your password for sudo:" with hidden answer default answer ""' -e 'text returned of result')

# Check if the user clicked "Cancel" (empty response)
if [ -z "$PASSWORD" ]; then
    osascript -e 'Tell application "System Events" to display dialog "Action canceled by the user." buttons {"OK"}'
    exit 1
fi

# Run the command with sudo
echo "$PASSWORD" | sudo -S find 2>/dev/null /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} +; killall Dock

# Check if the command succeeded
if [ $? -ne 0 ]; then
    osascript -e 'Tell application "System Events" to display dialog "The command failed. Check your password or command and try again." buttons {"OK"}'
    exit 1
fi

For ease of use, I've also attached the automator app I made. Simply run it when you want your launchpad reset. Enjoy!
 

Attachments

  • Launchpad Reset Post-MacOS 15.2.zip
    8.6 MB · Views: 204
One line versions in AppleScript, that can be saved as apps
Code:
do shell script "find 2>/dev/null /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} +; killall Dock" with administrator privileges

Code:
do shell script "find 2>/dev/null /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} +; killall Dock" user name "user" password "password" with administrator privileges

Use "Run-only" for the second one
Save a script as an app in Script Editor on Mac
https://support.apple.com/guide/script-editor/scpedt1072/mac
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.