Ubuntu – How to recover from a partial system upgrade

upgrade

When I was given the option to Upgrade to Ubuntu 12.10 I did try to Upgrade, but while it was upgrading the internet connection was lost and the system went through a partial upgrade.
Now when I try to open the Update Manager or the Software Sources it opens and crashes automatically.

What should I do?

Best Answer

When package upgrades are interrupted in midway, normally doing sudo dpkg --configure -a && sudo apt-get -f install && sudo apt-get upgrade will save the situation, but when is a full release upgrade (jumping from a version to another) the steps becomes more tricky.

What's the best solution for this cases? Reinstall. If you are not capable to reinstall, you may want to continue the upgrade using sudo update-manager-text or sudo apt-get dist-upgrade (the last one you shall modify your sources.list from oneiric to precise, see my command at the end), but that I won't guarantee will work. Other option is sudo do-releases-upgrade, but you must make sure that the process is not interrupted this time around.

To use apt-get dist-upgrade

sudo sed s/oneiric/precise/g /etc/apt/sources.list
sudo apt-get update
sudo apt-get dist-upgrade
Related Question