#!/bin/bash # https://blog.sleeplessbeastie.eu/2015/03/02/how-to-verify-installed-packages/ sudo apt-get install --reinstall $(dpkg-query -S $(sudo debsums -c 2>&1 | sed -e "s/.*file \(.*\) (.*/\1/g") | cut -d: -f1 | sort -u)