[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reinstall all packages



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I do I force files to be overwritten in aptitude ?
> Like apt-get --purge remove <package> && apt-get install <package>, but
> in aptitude.
> Re-installing in aptitude doesn't overwrite modified files. Is there an
> option ?

This isn't in aptitude, but it might work...I'm excluding dpkg and apt
because they would be needed for the script. I'm POSITIVE there are more
you would need to exclude to make sure you don't break things. You
probably want to get a list of everything apt and dpkg depend on and
exclude those in the egrep section.

for pkg in `dpkg --get-selections|awk '{print $1}'| egrep -v
'(dpkg|apt)'`; do dpkg --force-all --purge $pkg; apt-get install $pkg; done

Make sure you backup what you can before you do the above script. I
haven't tested it and I'm sure it'll break stuff.


Regards,
Tod Detre

- --
Pantek, Inc. - http://www.pantek.com/ - info@pantek.com
+1-877-LINUX-FIX - Expert Open Source Software IT Services.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8uL6IP3eD7Sc0oYRAs4LAJ9It0K06JLdPyJrTxw9+UGFMQC8iwCfUjCA
Dr2PwFGQpBpA7Oeqzu35Cu0=
=lKgv
-----END PGP SIGNATURE-----



Reply to: