Removing stuck Finder sidebar items in OS X Lion and Snow Leopard

Having trouble removing some pesky icons that have gotten stuck in the Finder’s sidebar? If you’re on Lion or Snow Leopard, the solution is easy:

  1. Click on the folder and drag it away from the sidebar
  2. Before you let go of the mouse button, hold down the Command (⌘) key
  3. Now that you’re holding down the Command (⌘) key, release the mouse button
  4. The icon should now finally disappear from your sidebar in a puff of smoke
  5. Hooray!

(Credit: Hybridair at MacRumors Forums)

Update 2011-08-20: Did you find this post helpful? It would be awesome if you’d take a moment or two to check out File Sanctuary, my hosting company. We’d love to help you with web hosting, email hosting, radio station hosting, domain registration, SSL certificates, and even giving you a safe place on the Internet to back your computers up to. We really care about the service we provide, and our prices are really good. Have a look around our website to find out some more, then get in touch and tell us what you need, and we’ll do everything we can to accomodate you. Thank you for reading my shameless plug! :)

Fixing CPAN on Snow Leopard (Mac OS X 10.6)


I ran into some problems with Perl’s CPAN installer on Snow Leopard, notably, it didn’t work once Bundle::CPAN was installed. Every time I tried to install a package I’d end up with an error like this:

Catching error: 'Can\'t call method "value" on an undefined value at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/IO/Uncompress/RawInflate.pm line 64.
' at /System/Library/Perl/5.10.0/CPAN.pm line 281
CPAN::shell() called at /usr/bin/cpan5.10.0 line 199

Not good. So, how to fix it? Move the broken IO::Uncompress module out of the way. In a terminal window, copy and paste the following

sudo mv /System/Library/Perl/5.10.0/darwin-thread-multi-2level/IO/Uncompress/RawInflate.pm /System/Library/Perl/5.10.0/darwin-thread-multi-2level/IO/Uncompress/RawInflate.pm-broken

Once that’s been shifted out the way, it should work provided CPAN was configured with the proper paths to your tar, bzip2 and gzip executables (if not, nuke your /System/Library/Perl/5.10.0/CPAN/Config.pm and start over).

Note: This isn’t a long-term solution, some things like CPAN::SQLite won’t install if IO::Uncompress::RawInflate is missing, but at least it gets some functionality back into CPAN. I’m very interested in hearing of any better fixes for this.