Tod Detre wrote:
-----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

A less drastic approach, which would not risk breaking anything, would be "apt-get install --reinstall $pkg" in place of the last two steps. I don't know if it would accomplish the same thing, however.

What I would do in this situation is run debsums -ca, and then individually reinstall the broken packages. For some unknown reason I get lots of missing md5sums when I run debsums -ca without regenerating the md5sums, so I keep a local archive that I can check against using the the following command:

 debsums -ca --generate=all --deb-path=<debs>

where <debs> is a directory containing simlinks to all the debs in the archive. This has the added benefit of insuring against a compromised system.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to