After an unclean shutdown, fsck reported corruption in several parts of the filesystem, apparently affecting installed packages (luckily no user data was affected).
Is there an easy way how I can reinstall these packages from scratch, e.g. tell apt or dpkg to install the same package again, without changing its flags (especially preserving the auto-installed flag)?
I have a list of the affected files and, with some effort, could figure out which packages I would need to reinstall. Alternative is to reinstall everything installed on the system.
Best Answer
For each of your corrupted file, the package that installed your file can be obtained with:
You can then reinstall it with the command:
If all your corrupted files are in a single file
list.txt
, then you can obtain all the associated packages with:And of course install all those packages with that single command: