Reset root password in single user mode:
Step 1: Reboot system.
reboot -f
Step 2: Press ESC at GRUB screen. Step 3: Select default entry and then 'e' for edit. Step 4: Scroll down until, you see a line that starts with linux, linux16 or linuxefi. Step 5: At end of that line leave a space and add without quote 'rw init=/bin/bash' Step 6: Press Ctrl-X to reboot. Step 7: After reboot, should be in single user mode and root, change password.
passwd
Step 8: Reboot system.
reboot -f
Reinstall a package:
apt-get install --reinstall <COMPROMISED PACKAGE NAME>
Reinstall all packages:
apt-get install --reinstall $(dpkg --getselections lgrep -v deinstall)