for p in `dpkg -l | egrep '^ii' | awk '{print $2}'`; do apt-get install --reinstall $p ; done
Подробно