[aklug] Re: doing a apt-get reinstall everything on debian?

From: Leif Sawyer <lsawyer@gci.com>
Date: Thu Jan 19 2012 - 11:06:42 AKST

aptitude is your friend:

# aptitude -f reinstall [pkgname]

So, then, theoretically, you could:

# dpkg -l | grep '^.i' | awk '{print $2}' > pkgs
# aptitude -f reinstall $(cat pkgs)

> -----Original Message-----
> From: aklug-bounce@aklug.org [mailto:aklug-bounce@aklug.org]=20
> On Behalf Of techno curmudgeon
> Sent: Thursday, January 19, 2012 10:56 AM
> To: aklug@aklug.org
> Subject: [aklug] doing a apt-get reinstall everything on debian?
>=20
> Hi all,
>=20
> the root drive (ext2 on a usb thumbdrive) got corrupted on a small
> debian box I'm running. The box is nothing critical and an fsck took
> care of the fs level damage. The machine boots now, but there's
> apparently lots of little lib files and other stuff that got messed up
> when the thumbdrive barfed.
>=20
> Now, I can certainly restore from backup (yes, I have one), but I was
> wondering if debian can do something like
>=20
> # apt-get install --reinstall <everything>
>=20
> Googling doesn't bring up anything obvious so if not then off the top
> of my head, I can bash something like (concept code, not real code)
>=20
> # dpkg -l | awk | apt-get install --reinstall {}
>=20
> but if apt already has that option somewhere that I just can't find,
> why reinvent the wheel?
>=20
> My other question is whether doing a reinstall everything like this
> may actually be a bad idea. And if it is a bad idea, why ?
>=20
> Thoughts?
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>=20
> =
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu Jan 19 11:06:53 2012

This archive was generated by hypermail 2.1.8 : Thu Jan 19 2012 - 11:06:53 AKST