If everything goes horribly wrong, set up a new, clean VPS and you can first restore all your installed packages by doing dpkg --set-selections < package list.txt then apt-get install dselect then ...