Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assume, I have a system with all the packages installed, which I want, and all configuration files set up as desired. However, the files on the file system could have become corrupted or missing due to some mistake in the past or hardware error. The corrupted files would be replace if the package in question was reinstalled. Such a situation is described elsewhere

Can I safely run

aptitude reinstall ?installed

to get a fresh version of my system?

share|improve this question
up vote 2 down vote accepted

A good way to deal with file corruption is to use `debsums' (see these instructions, and also this great answer), though they're starting with a non-booting system) which will discover which files are corrupted; then you can reinstall just those packages.

Your reinstall command is safe, but it's not guaranteed to fix everything that might have been caused by a hardware error.

You might also like to force a fsck or run a badblocks scan. You can do both of those from inside the disk utility.

share|improve this answer
The answer provided by enzotib in Is there a Ubuntu sanity check also gives good instructions for debsums. – Jan Aug 19 '11 at 7:58

I would not suggest to do so, because it could be a very long and for the most part un-useful operation. Moreover configuration files and personal configuration files are not involved in the simple reinstall, and the problem could be just there.

It is better to try to determine which packages have problems and reinstall only these packages.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.