Cleaning your OS in Kubuntu and GNOME

Cleaning your OS in Kubuntu and GNOME


So, you’ve now taken the successful plunge and finally let the Microsoft nightmares fade into expensive and unpleasant memories.

You have your brand new, full-featured, Mandriva, Debian, or Kubuntu, free OS running your browser, email, and office, routines through a lovely KDE, or GNOME, desktop that’s simplicity itself to operate.

Next, you work out how to get all your free software repositories enabled and the true “Wow!” experience suddenly begins to hit you right between the eyeballs.

There’s nothing in the Microsoft experience that can prepare you to cope with that initial shock, when you realise more than 20,000 extra items of free software are just sitting there waiting for you to click on them, so they can install themselves into your system for free.

Like a kid in a lolly-shop? You’re not kidding.

New, and updated, applications, are continuously being added at such a rate that you can never really hope to try them all, but still, you make the effort. Some, you fall in love with, and they become permanent fixtures in your setup; others, you realise, are not suited to your particular requirements of the moment and you soon remove them. Most of us never stop doing this sort of thing.

Now, all these free software applications that we download, bring various files and libraries with them, as dependencies. When we decide to remove one of these applications, some of these files sometimes get left behind to float around like lost souls in the cyberspace of your once pristine OS.

These detached files are called orphan files, or orphan packages. Mostly, they do no particular harm, but it’s nice to think your operating system remains just as shiny and clean inside, as the day you first installed it.

Fortunately, GNU/Linux can supply a nice little GUI that will quickly take care of this sort of housekeeping, after you’ve been having fun adding and removing software applications.

The quick way to find these GUIs is to go into Adept, or Synaptic, or whatever the package manager is called in your distro, and search for “orphan”. My Adept package manager quickly spits out two packages; deborphan, and gtkorphan.

Kubuntu beginners would go to K menu, select “system”, then open “Adept Manager”, and insert your password when prompted. When Adept loads, type “orphan” into the “Search” box near the top. You won’t need to press “enter” because Adept will automatically commence your search as soon as the word is completed. Two entries will appear in the search results window at the lower left; “deborphan” and “gtkorphan”. For KDE you will need “gtkorphan”, so right click on “gtkorphan” and select “request install”. Then go to the toolbar at the top of the page and click on “Apply Changes”. The rest of the installation is automatic after that, although you can click on “show details” to see exactly how Kubuntu goes about installing new free software. If you want to remove the software, start Adept, then type “gtkorphan” into the “Search” box. When “gtkorphan” appears in the results window as “installed”, simply right click on it and select “request removal”. Then “Apply Changes”, and the software is automatically removed as easily as it went on.

Ubuntu beginners would do likewise, by going to “System”, in the toolbar at the top of the desktop, then to “Administration”, then select “Synaptic Package Manager”. At the prompt, enter your password. When “Synaptic” appears, go to “Search” which is on the second toolbar from the top. Once again, enter the word “orphan” and press “enter”. Unlike “Adept” in KDE, this search will produce a number of packages with similar properties to gtkorphan, notably “Kleansweep” which users might like to try as an alternative to gtkorphan. However, “gtkorphan” is the package that will be installed in this instance. Right click on gtkorphan and select “Mark for installation”. A little box will jump up saying “Mark additional required changes?”, and in the box will be “To be installed deborphan” (This is a package that is dependent on gtkorphan). Click on “Mark”, or just press “enter” (which is the same thing) and the box will disappear and the deborphan line will now turn green. You’re all set now, so go to the second toolbar and click on “Apply”. A little box will jump up with “Apply following changes?”, with the two packages to be installed listed below. Click on “Apply” and a little box jumps up saying “installing packages”. If you’re quick enough you can click on “details” and a window will come up showing the installation process. Close “Synaptic”.

At this point, if will need to launch gtkorphan. In KDE, click the K menu, then “settings” and select “Remove orphan packages”. In GNOME, Click on “System” in the top toolbar, then go to “Administration” and then “Remove orphan packages”.

After running the program, put in your password at the prompt, and up pops GtkOrphan with tabs for “Orphaned packages” and “Non-orphaned packages”. Check the “Orphaned packages” tab, then check the check-boxes beside each orphan file that appears there, press “Remove”, and away they go. Sometimes the removal of these files will, in turn, orphan further files that were previously dependent only on them. Just repeat, until the No orphaned libraries found..., sign appears.

Presto, you’ve got an OS, so clean, that Steve Ballmer would want to eat his dinner off of it.

Category: 

Comments

undefined's picture
Submitted by undefined on

how timely as i cleaned up a new ubuntu installation yesterday (though this article was written nearly a week ago, i've been skipping over it in my rss reader until today).

deborphan isn't just for cleaning up forgotten libraries, but default installation cruft. i'm setting up a new computer with ubuntu (debian for me, ubuntu for her) and the user is migrating from windows where she used thunderbird. so off comes evolution. then i run "deborphan -Psna | sort | less" and see what uninstalling evolution orphaned. i also uninstalled all the asian fonts (~20 package), the scim input method, etc. how did i know those were candidates for removal? deborphan!

yeah, aptitude (and other meta-dpkg apps) are capable of uninstalling packages (when the reverse dependency is uninstalled), but i don't trust them. just because B was installed with A, doesn't mean i want to uninstall B when i uninstall A. no application can currently read my mind.

it takes some knowledge of the packages to use deborphan ("apt-get show <package>" is your friend), otherwise you'll eventually uninstall everything. i actually have a cron job that saves the output of deborphan and whenever i'm in the mood for spring cleaning i diff the current output with a previous version and see what's changed over time and what packages i no longer want/need.

Laurie Langham's picture

Yeah GtkOrphan is a GUI-based front-end for Deborphan that's for beginners, or the terminally lazy, like me. GtkOrphan can only find, and remove orphan files, whereas Deborphan, from the command line, is a far more accomplished package.

Author information

Laurie Langham's picture

Biography

A retired, recent Kubuntu fanatic, who has graduated through Microsoft, Mandrake, Debian, Ubuntu,and now to Kubuntu.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!