Files list file for package missing -- dpkg warning

One loop over the seven packages' names to recreate the list-file for each package.

But first run

sudo apt-get autoclean

to remove unneeded DEBs in /var/cache/apt/archives. This is necessary that the following commands work properly.

arch="$(dpkg --print-architecture)"
for p in
  unity-scope-gourmet unity-scope-guayadeque unity-scope-gmusicbrowser
  unity-scope-manpages unity-scope-firefoxbookmarks unity-scope-gdrive
  unity-scope-home
do
    find /var/cache/apt/archives -type f -name "${p}_*_${arch}.deb" -exec dpkg-deb --fsys-tarfile {} \; -quit | tar t | cut -f2- -d. | sed 's|^/$|/.|;s|/$||' | sudo tee "/var/lib/dpkg/info/$p.list" > /dev/null
done
sudo chmod -R a+r /var/lib/dpkg/info

Some tests later, the command

sudo apt-get install --reinstall unity-scope-gourmet unity-scope-guayadeque unity-scope-gmusicbrowser unity-scope-manpages unity-scope-firefoxbookmarks unity-scope-gdrive unity-scope-home

should also help.