apt-get update && apt-get install dpkg-repack
dpkg -l|awk '/^ii/{ print $2 }' > apps_installed.txt
apt-get update && apt-get install -dy --reinstall --force-yes$(<apps_installed.txt)
dpkg *.deb
dpkg--configure -a
apt-get install -f