[Gllug] Repairing ubuntu packages
Morris, Simon
Simon.Morris at cmtww.com
Mon Jan 10 16:49:01 UTC 2005
> -----Original Message-----
> From: gllug-bounces at gllug.org.uk
> [mailto:gllug-bounces at gllug.org.uk] On Behalf Of Jack Bertram
> Sent: 10 January 2005 16:32
> To: GLLUG List
> Subject: [Gllug] Repairing ubuntu packages
>
> After extensive filesystem corruption [1] I would like to
> repair all my installed packages automatically on my Ubuntu
> system. Ideally I'd write a short script that parsed the
> result of some dpkg command showing which .debs I had
> installed, and which automatically restored from the .deb all
> files that had changed since installation (*except* /etc
> files, which I would want to review before changing). What's
> the easiest way to do this?
I can provide half the answer for you here.
If you run the following command you get a list of the packages you
currently have installed
COLUMNS=200 dpkg -l | awk '{print $2}' > ~/packages.txt
You could then (try) and restore the previous set of packages with
Apt-get install `cat ~/packages.txt`
However, this doesn't always work :(
You sometimes get stuck on kernel packages or some dependancy problems.
~sm
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list