Cleaning Up Messy LaunchPad (The Geeky Way)

my-apps-on-mac-book-pro

I was installing and updating apps on my MacBookPro, and accidentally dragged an .app file into a sub-folder in the Application folder (which it doesn’t belong).  That inevitably created a duplicate icon for the app in the LaunchPad.  After cleaning up my mess in the Application folder and moved everything into their right places — I’m a bit OCD when it comes to my machines — I still ended up with 2 icons for the same app in LaunchPad.

To clean up the “eye sore” (I told you I’m OCD!), I went online and found this really cool trick by using sqlite3 to clean up my messy LaunchPad:

Step 1:

Open up Terminal (Applications –> Utilities –> Terminal).

Step 2:

Go to the directory where the Dock/LaunchPad info is stored —

cd /Users/yourusername*/Library/Application Support/Dock

* Change yourusername* to your actual username on the machine.

Find out the name of the database file (.db), and open it using sqlite3 —

ls -l
sqlite3 the-database-filename.db*

* Change the-database-filename.db* to the actualy .db filename that you get from ls -l.

Step 3:

Take a look at the tables inside the database —

.table

sqlite3-1

apps is where the LaunchPad info is stored, and there’s where we will make some changes.

Step 4:

Let’s take a look at apps table’s schema —

.schema apps

sqlite3-2

And let’s see what’s in apps

select * from apps;

sqlite3-3

This is just a sample of the first few entries that’s in my database.  Your list will most definitely be longer than this.

Step 5:

Look for the app name that you want to remove from the LaunchPad, and note the numeric ID… For example, if you would like to remove the Evernote icon from LaunchPad, 13 is the ID you want to use.

Now run the SQL delete query to remove the entry —

delete from apps where item_id = numericID*;

* Replace numbericID* with the actual ID that correlates to the app whose icon that you want to remove.  In our example, the SQL query would look like

delete from apps where item_id = 13;

Step 6:

Exit out of the sqlite3 by pressing CTRL+z.

Step 7:

Refresh your LaundPad by running the following command in Terminal —

killall Dock

And you are done!

Many thanks to Matt Hardy for the handy trick, found on discussions.apple.com; and the LaunchPad refresh tip from OSXDaily.