HowTo: Reinstall Ubuntu Automatically

Sometimes after a partial upgrade of Ubuntu you suddenly find that it has broken down the System Dependency Tree and now you are unable to revert back the changes.
In such cases there is a very simple command that reinstalls all the distribution packages and reconfigures them automatically.
sudo dpkg-reconfigure -phigh -a
Since this command would take a lot of time to process (~1 hour) depending on your hardware in case you have a minor dependency problem you can fix it via
sudo apt-get install -f