I was under the impression that Ubuntu used Debian's package management system, so that to find broken packages, all I needed to do was type:
sudo debsums --changed
which would give me installed files whose checksums had changed. Then, type:
dpkg --search *Full Name of Changed File*
which would tell me which package installed that file. And, then, just reinstall that package. However, when I tried that, I had the following experience:
me@Bedrock1:~$ sudo debsums --changed /usr/sn somehow corrupted.hare/doc/gcc-4.7-powerpc-linux-gnu-base/changelog.Debian.gz
So, I now 1 file that's bee
me@Bedrock1:~$ dpkg --search /usr/share/doc/gcc-4.7-powerpc-linux-gnu-base/changelog.Debian.gz gcc-4.7-powerpc-linux-gnu-base: /usr/share/doc/gcc-4.7-powerpc-linux-gnu-base/changelog.Debian.gz
I've found the package that installs it
me@Bedrock1:~$ sudo apt-get --reinstall install gcc-4.7-powerpc-linux-gnu-base Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: at cowdancer dctrl-tools debootstrap dh-apparmor distro-info-data dput html2tex inkscape kde-l10n-engb libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libcommon-sense-perl libdistro-info-perl libexporter- lite-perl libgtkspell0 libio-stringy-perl libjson-perl libjson-xs-perl libmagick++5 libmail-sendmail-perl libparse-debcontrol-perl libsys-hostname-long-perl libtie- ixhash-perl linux-image-generic po-debconf python-dateutil python-uniconvertor python3-magic Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/14.8 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... 345606 files and directories currently installed.) Preparing to replace gcc-4.7-powerpc-linux-gnu-base 4.7.3-1ubuntu1cross0.7 (using .../gcc-4.7-powerpc-linux-gnu-base_4.7.3-1ubuntu1cross0.7_amd64.deb) ... Unpacking replacement gcc-4.7-powerpc-linux-gnu-base ... Setting up gcc-4.7-powerpc-linux-gnu-base (4.7.3-1ubuntu1cross0.7) ...
I've reinstalled that package
me@Bedrock1:~$ sudo debsums --changed /usr/share/doc/gcc-4.7-powerpc-linux-gnu-base/changelog.Debian.gz
But the file is still corrupted !?
Is there something here I'm not understanding? Or is the real solution to manually delete any corrupted files before reinstalling the appropriate package?