Reinstalling applications with Synaptic Package Manager

This is a post I wrote last summer on my other blog, but I think it’s a useful one so I’m re-posting it here. 

I’m here today with a handy tip for Linux users. Most people who use a Linux-based operating system may already know about this; but for those who don’t or newer Linux users this can be very handy.

A couple of weeks ago the hard drive failed (as they all eventually do) on my old HP Compaq computer that I use to experiment with different Linux distros. Months ago it started making those funny ‘chicka-chicka’ noises every once-in-a-while to let me know that the hard drive was wearing out. It didn’t happen very often, but the other day it ‘chicka-chickaed’ for the last time and the system froze. I tried to reboot, but the BIOS could no longer find the hard drive.

Fortunately I’d done a backup to an external hard drive about 2 weeks earlier. I should probably do it more frequently, but I don’t use that computer as often as our other two. Rule #1: Backup often!

I really like this computer. I bought it used about two years ago and it works great. It has a relatively fast processor (Pentium 4) and 2 Gbs of RAM and I know the hardware works well. So I stopped by the local computer store to see about replacing the hard drive. They had a spankin’ new 500 Gb HD for $70. But, not desiring to spend any more than I possibly could, I ended up buying a used 80 Gb HD for $20 which still has twice the storage capacity as the old one. I brought it home and put the new(er) drive in.

I popped in a Live CD and installed Bodhi Linux, which I’d been using on the old hard drive. In a short time I was back in business with Bodhi. Now comes the fun part.

Along with backing up my /home partition, I also use Synaptic Package Manager to periodically make a backup list of all my installed packages (applications and their dependencies). To do this you need to be using an Ubuntu-based distro or one that uses Synaptic. I’m not familiar with doing this in other distros that use a different package manager. But in Bodhi Linux, Linux Mint, or any other Ubuntu/Debian derivative, just open Synaptic; go to File> Save Markings. Make sure to check the little box that says ‘Save full state, not only changes’ and then save that file to wherever you want (preferably wherever you saved your /home backup).

Then when you need to reinstall an operating system, after applying all updates, you can open Synaptic, go to File> Read Markings and choose your saved Packages file. As long as you’re connected to the internet it will automatically download and install all the applications and other packages that you had originally installed. This certainly saves a lot of time and trouble so you don’t have to search for and reinstall all your applications. You can also do this if you don’t have an internet connection by using APTonCD. But that’s another story.