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.
apt-get --reinstall install packagename
?dpkg -S /full/path/of/the/corrupted/file
will give you the packaged that installed the file.