Ubuntu – How to upgrade Ubuntu to newer release manually (without using update manager)

updatesupgrade

I need this for 3 purposes:

  1. For some reason, Ubuntu 13.04 on my home computer did not want to upgrade to 13.10. It said "No new releases found".

  2. And some Ubuntu derivatives (such as Mint) do not use update-manager at all.

  3. Also, in manual mode it is possible though not recommended to skip releases 😛

Best Answer

Let me say, I wanna upgrade to Trusty directly from Raring skipping Saucy. How do I do that?

  1. Fully upgrade your existing installation.

    sudo apt-get update && sudo apt-get dist-upgrade
    
  2. Disable all 3rd-party applications & PPA (especially xorg-edgers!!!)

    sudo sed -i s/deb/#deb/ /etc/apt/sources.list.d/*.list
    
  3. Change release and update:

    sudo sed -i s/raring/trusty/ /etc/apt/sources.list
    sudo apt-get update
    
  4. (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.

  5. 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
    
  6. 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
    
  7. Finally, dist-upgrade:

    sudo apt-get dist-upgrade
    

Voila! The system is fully upgraded! To finish, delete old kernels and obsolete packages through Synaptic.

Related Question