How can I upgrade Ubuntu to newer release manually (without using update manager)?
I need this for 3 purposes:
For some reason, Ubuntu 13.04 on my home computer did not want to upgrade to 13.10. It said "No new releases found".
And some Ubuntu derivatives (such as Mint) do not use update-manager at all.
Also, in manual mode it is possible though not recommended to skip releases :P
Solution 1:
Let me say, I wanna upgrade to Trusty directly from Raring skipping Saucy. How do I do that?
-
Fully upgrade your existing installation.
sudo apt-get update && sudo apt-get dist-upgrade
-
Disable all 3rd-party applications & PPA (especially xorg-edgers!!!)
sudo sed -i s/deb/#deb/ /etc/apt/sources.list.d/*.list
-
Change release and update:
sudo sed -i s/raring/trusty/ /etc/apt/sources.list sudo apt-get update
-
(Most cautious part starts here) Upgrade:
sudo apt-get upgrade sudo apt-get dist-upgrade
During this, you can experience errors!!!. That's normal. To fix, simply run
sudo apt-get -f install
and the command was running before. Until success on dist-upgrade.Also, you will be prompted to replace some configuration files. Keep the files you manually configured and replace those configured by scripts.
-
Reboot and enable repositories you disabled:
sudo sed -i s/#deb/deb/ /etc/apt/sources.list.d/*.list
You may want to disable sources. Run
sudo sed -i s/deb-src/#deb-src/ /etc/apt/sources.list.d/*.list
-
Update release name in repositories and update
sudo sed -i s/raring/trusty/ /etc/apt/sources.list.d/*.list sudo rename s/raring/trusty/ /etc/apt/sources.list.d/*.list sudo apt-get update
Replace non-working repositories with previous versions and update
sudo sed -i s/trusty/saucy/ /etc/apt/sources.list.d/jwigley-window-list-trusty.list sudo sed -i s/trusty/saucy/ /etc/apt/sources.list.d/playonlinux-trusty.list sudo sed -i s/trusty/saucy/ /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list sudo apt-get update
-
Finally, dist-upgrade:
sudo apt-get dist-upgrade
Voila! The system is fully upgraded! To finish, delete old kernels and obsolete packages through Synaptic.