From http://ubuntuforums.org/showthread.php?t=735693 sudo apt-get clean paste below into reinstall_all.sh \#\!/bin/bash for pkg in `dpkg --get-selections | awk...