So in the past, I've used commands like this to remove an app from LaunchPad:
sqlite3 ~/Library/Application Support/Dock/*.db "DELETE from apps WHERE title='APPNAME';" && killall Dock
And that has worked. But a couple things have happened. That database has moved and is no longer in ~/Library/Application Support/Dock/ and it seems in it's new location, it may not be a sqlite db any longer.
If you use the following command, you can find it's new location on Sierra:
sqlite3 $(sudo find /private/var/folders -name com.apple.dock.launchpad)/db/db "DELETE FROM apps WHERE title='APPNAME';" && killall Dock
This gives you a seemingly random location within /private/var/folders, however it seems the sqlite command does not let you edit the file. It also seems it just may not be a sqlite database any longer.
Anyone have any luck with this yet? And yes, I know if I delete the app from /Applications it won't show up anymore but I want to use that as a last resort.
Crazy, I'm glad I didn't read your post and just copy/pasted your new line as it worked fine for me. Only thing I can is maybe try doing "sudo su" and then making your way into the folder and run the sqlite command from actually in the same folder as the db for troubleshooting. But bottom line, your line does work. I used it to delete a disconnected entry from a deleted app. One other thought is maybe it worked for me because I have SIP (System Integrity Protection) turned off.
FTD! Yep revived an old thread...sorry...
Try sqlite3 $(find /private/var/folders ( -name com.apple.dock.launchpad -a -user $USER ) 2> /dev/null)/db/db "DELETE FROM apps WHERE title='APPNAMEHERECASESENSITIVE';" && killall Dock
Works in Catalina.
I am a far cry from a scripter but I am having issues.
I cannot get this to work to remove some icons from Launchpad on Mojave or Catalina.
sqlite3 $(find /private/var/folders ( -name com.apple.dock.launchpad -a -user $USER ) 2> /dev/null)/db/db "DELETE FROM apps WHERE title='RoamingClientMenubar';" && killall Dock
Am I missing something?
If you're running it as the end user, don't "sudo su" and then run. Just run it like this:
sqlite3 $(sudo find /private/var/folders ( -name com.apple.dock.launchpad -a -user $USER ) 2> /dev/null)/db/db "DELETE FROM apps WHERE title='AppNameHere';" && killall Dock
The way you're running it (I'm assuming), you are getting a "cannot open /db/db" error - right?
If so, the above method should resolve it for you.
Be aware that the app name has to match 100%. If it's off by even a space or a capitalization error, it will not work.
If you're running it as a script from jamf pro, then you can omit the sudo and run it the way you have posted.
@Chubs I ran it like that too. It still failed with not permitted error. I have JAMF and Cisco involved now. Will post when and if I have a response to a fix but I did learn from JAMF that the Launchpad is in the protected area of the drive and may not allow it in Mojave or Catalina due to SIP.
Hello, I'm trying all the methods above, however, I'm not able to remove a dead shortcut from Launchpad. I'm logged into the Mac with non-admin credentials. I've tried using the su localadmin command within terminal to use terminal as our localadmin account - still can't remove it. What am I doing wrong?