Clearing Launchpad and other OS X Lion (10.7) Tips

By Loren Segal on July 07, 2011 at 721:840:166 PM

Update (Jul-25-2011): I fixed the “clear launchpad” command to properly remove any empty folders and reset the page count, since some users reported that it was leaving some folders lying around.

I just installed Lion today, though I had been using the Developer Previews for a while now. I like Lion, but some things irk me. I’ve compiled a list of tips that I use to make my experience more sane, most specifically, clearing the list of apps in Launchpad (which I couldn’t find discussed anywhere else).

1. Clearing your Launchpad

Before you do this, realize that this command will delete data. If you care about how your apps are setup in Launchpad, you will want to backup the .db file below. Do it before issuing the command.

So, most people might not need to do this, but the default behaviour for the Launchpad in Lion is to basically add every .app file within your user and system Applications folders, as well as whatever is in ~/Downloads, apparently. While this makes sense as a default, I find that it pulls in way too many utility applications that I will never need to see (think all those Adobe Help and manager apps, in addition to Apple’s own set of “SuperDrive firmware update” apps that have accumulated in my Utilities directory over the years). Instead of dragging them all out one by one, I wanted to just clear everything out and drag my apps in, rather than drag apps out. That way I could focus on what I want to see— I’m a minimalist, after all.

Anyhow, here’s what you do to clear out those pesky apps in your Launchpad. Load up Terminal (/Applications/Utilities/Terminal.app) and copy paste the following, and hit enter:

sqlite3 ~/Library/Application Support/Dock/*.db "DELETE from apps; 
  DELETE from groups WHERE title<>''; DELETE from items WHERE rowid>2;" \
  && killall Dock

Make sure you copy the above command as a single copy paste with the newlines and all, not as separate commands, otherwise you may see some errors in your Terminal.

Voila. Your Launchpad should now be empty. You can drag apps in normally by dropping them into the Launchpad icon in your dock (I actually got rid of Launchpad from my dock, but I put it back temporarily to drop them in. Anyone know a better way to drop apps into Launchpad?)

Resetting Launchpad Database to Lion Default

If you want to reset Launchpad to its initial Lion functionality, you simply need to delete the .db file that you just modified. You can navigate to the above folder in Finder, or issue the following command (in Terminal.app):

rm ~/Library/Application Support/Dock/*.db

2. Enabling Key Repeat

OS X Lion replaces key repeat with this nifty-but-not-very-useful (to me, anyway) character picker popover that lets you choose an accented character when you hold down certain keys. Some people will love this, but I respond, “ffffffuuuuuuuuuuuuuuuu”. Keep in mind that this will only bite you in applications with a default NSTextField control (the standard Cocoa text field), so it will not affect applications like Terminal, MacVim, Chrome (I’m told), etc. — but that doesn’t cut it for me. I want key repeat back to normal everywhere.

How to do it? This one is easier. Again, load up Terminal and type:

defaults write -g ApplePressAndHoldEnabled -bool false

You’ll have to restart any of the apps in question (force quit Finder, etc) to see the change, but you will be able to key repeat, now!

3. Showing the Library Folder

OS X Lion has apparently taken (the wrong) cues from Microsoft and started hiding folders in the user’s home directory by default. The Library folder is one such folder. This seems odd to me in general, but even odder because the Library folder is actually useful to navigate to, especially since it holds your “Application Support” folder, which, if you’ve ever played Minecraft, or used TextMate (or many other apps), you’d know is the place where most of your user data is stored. I’m not sure why Apple decided to hide the place where your user data is stored. I personally like to be able to navigate to my user data without having to use Terminal, and without having to use Finder’s Command+Shift+G (Go To…) shortcut.

Again, this is easy to reset, just load up Terminal and type:

chflags nohidden ~/Library

4. All Together Now:

I made a Gist shell script file that I could easily execute on new machines to reset the defaults to the way I like it. Feel free to use this on your machines:

Questions? Comments? Follow me on Twitter (@lsegal) or email me.