Uninstalling .deb Packages

29 March, 2009

.deb packages, for the uninitiated, are functionally equivalent to .exe’s in Windows. You download them and then run them and they install software, drivers, etc on your computer. They are somewhat more convenient than using apt-get in many situations and they often seem friendlier to newcomers. But beware, the .deb has a dark side.

Just like with apt-get, .deb’s each have a unique package name, and you need to know this to uninstall them. Unlike apt-get, there is no handy-dandy GUI equivalent to provide you with a list of packages currently installed should you forget this name. So, if you want to uninstall a .deb file but can’t remember the exact package name, be prepared to do some digging.

The first, fastest, and probably most painless way may seem a little unintuitive; download the package again. Go back to where you got it, download it again, and open it with gdebi package installer. It will show the package name along with various other tidbits of information. Once you have the package name you can delete the newly downloaded file, and then go seek and destroy the installed version. If this option is available to you, do it- it will save you many a headache. However, there may be times when it is not; if you don’t remember where you got it or it’s no longer available, etc. Don’t worry, it’s still possible to uninstall the file, I just can’t guarantee that you won’t want to kill yourself by the time it’s done.

Second method is to run a wildcard search using dpkg. This is also fairly painless, but it only works if the package name is somewhat obvious- which they aren’t always. The command to use:

dpkg -l '*keyword*'

Where keyword is any word or bit of word that might be in or close to the package name. Say I wanted to uninstall Open Office: a good keyword here would be open. The list of packages that comes up is pretty long, but Open Office is indeed there. You can narrow it down more but you risk accidentally cutting out the package you want. So keep your keywords as basal as possible.

If after running a wildcard search you still have not found your package name you will need to get somewhat medieval and search the installed packages by hand. It’s tedious, but there are a few tricks to  speed it up. If you think you know the first letter of the package, you can use a permutation of the previous command to narrow your list:
dpkg -l 'x*'
Where  x is your letter of choice.

You can also search through the packages using a semi-gui called aptitude. In your terminal:
gksudo aptitude
While not exactly intuitive, aptitude at least separates the installed packages into categories. The first place to check is the upper-level category “Obsolete and Locally Created Packages”. Chances are good your package is in there, but if it’s not you’ll need to sift through the other categories to find it.

Okay, so, assuming you haven’t just chucked your computer out the window by now, you probably have your package name. Now you can finally delete it! This may be a bit anticlimactic, but geekdom isn’t exactly known for edge-of-your-seat thrills. Here’s the command to nuke that son of a bitch:
sudo dpkg -r package

The whole process of uninstalling .deb’s is really quite annoying and I’m surprised some programmer hasn’t come up with a little tool to at least search packages efficiently. In all honestly, probably the best way to handle this is to keep a text file with the names of all packages you install via .deb. It’s inconvenient, but should the time come to delete the file you will be very happy you did it.


Pixels are Red, Some are Blue; I Hate Twitter and So Should You

24 March, 2009

Yes, it’s true. Not only was that an awesome rhyme that took me longer than I care to admit to think up, but the sentiment describes exactly my feelings for Twitter and the new “Microblogging” trend.

Here’s the thing: I didn’t really think much of blogging either when it first started out, and there’s still a lot about it that drives me batty. The fact of the matter is, 90% of blogs, probably including this one, are boring people whining about boring things. That said, the effect of blogging and other Web 2.0 initiatives on our culture borders on alarming. The sway that bloggers held in the recent election alone is enough to give one pause, and I have to say I really like that everyday people are finally able to have some power over our world.

Twitter, on the other hand, is unbelievably annoying. It is banal, pointless, and a complete waste of bandwidth. The basic idea is that you have this page and you make a post every time you do something- the more trivial the better. I think the reason Twitter has become so popular is that people really, really like the idea that someone, anyone, really cares enough about them to want to know what they are doing every moment of every day. Of course, in reality no one does, because nine times out of ten they’re just a boring loser, but Twitter at least allows them to delude themselves with daydreams of importance. I have no doubt that, in the scheme of things, I am also a boring loser, but at least I have the self respect not to try to convince myself I’m anything but. I can really only think of two people who would actually like to know what I’m doing every hour of everyday, and if I wanted them to know, I wouldn’t have left home! Besides, I think even my parents would eventually lose interest because my Twitter feed would look something like this:

Sarai (9:30) – My alarm just went off. Bah, gotta get out of bed. Think I lost my keys again.

Sarai (10:11)- Eating breakfast in the café- cinammon rolls again! Out of milk, though.

Sarai (11:04)- In class. God, my professor’s voice is monotonous. That man could make immunology boring.

Sarai (11:46)- Pwning some n00bs. Getting carpal tunnel syndrome from playing too many video games.

Sarai (12:33)- Changing the icons in my word processor to match the icons on my desktop.

Sarai (1:09)- Writing some blog about Twitter than no one will ever read.

And so on and so forth. Thus, I propose a rule: in order to receive a twitter account, one must prove to the online community that one is either interesting, famous, or really, really hot. This process must involve, at minimum, a criminal background check, five writing samples, and a colonoscopy WITHOUT anesthetics. That’ll weed out the boring people!