do-release-upgrade failing on Ubuntu 16.04 LTS - says: No new release found

12,022

I had exactly the same problem and solved it by using the "Debian way" as described at https://linuxconfig.org/how-to-upgrade-to-ubuntu-18-04-lts-bionic-beaver.

  1. Before, I had modified my default /etc/apt/sources.list file to the one described here: https://gist.github.com/rohitrawat/60a04e6ebe4a9ec1203eac3a11d4afc1 (that step was probably useless, since my sources.list file looked fine). After that, do-release-upgrade still produced a "No new release found" message.
  2. I changed xenial to bionic in /etc/apt/sources.list (there was nothing to change in the files under /etc/apt/sources.list.d/) by running this:

    $ sudo sed -i 's/xenial/bionic/g' /etc/apt/sources.list

  3. I upgraded everything with:

    $ sudo apt update && sudo apt -y dist-upgrade

  4. And reboot

Then I was greeted with Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-76-generic x86_64) and everything seems to work fine (lsb_release -a confirms that I am using Ubuntu 18.04.4 LTS).

Note that I upgraded from 14.04 LTS to 16.04 LTS a few weeks ago with do-release-upgrade, with no problem. Also note that I am not an experienced Linux/Ubuntu user, but I hope this can help.

Share:
12,022

Related videos on Youtube

Bastion
Author by

Bastion

Updated on September 18, 2022

Comments

  • Bastion
    Bastion over 1 year

    -- Our Situation --

    We haven't been able to get do-release-upgrade to run on our Ubuntu 16.04 LTS systems in the past few weeks.

    We have 100+ machines to upgrade. Have read the other solutions and none of them work so far (eg: How do I upgrade to a newer version of Ubuntu? How to remove obsolete packages after failed release upgrade via do-release-upgrade on Ubuntu? How to only perform LTS upgrades? ) - that is except for the "brute force" method of manually changing the distro in /etc/apt/sources.list[.d/]* .. I'm not a fan of this method as it seems overly messy and not particularly friendly.

    Is do-release-upgrade broken on 16.04LTS ? do-release-upgrade worked sometime mid last year, and now it isn't..

    -- Some info.. --

    * Require a command line based solution as we need to automate this.
      We will be updating over 100 machines
    * None of the existing solutions get do-release-upgrade to work.
        sudo do-release-upgrade
        sudo do-release-upgrade -d
        sudo do-release-upgrade -c
    * update-manager-core package is installed
    * File /etc/update-manager/release-upgrades has:
        [DEFAULT]
        #...
        Prompt=lts
    
    * File /etc/update-manager/meta-release has:
        # default location for the meta-release file
        [METARELEASE]
        URI = https://changelogs.ubuntu.com/meta-release
        URI_LTS = https://changelogs.ubuntu.com/meta-release-lts
        URI_UNSTABLE_POSTFIX = -development
        URI_PROPOSED_POSTFIX = -proposed
        /etc/update-manager/meta-release (END)
    

    -- Error Messages --

      do-release-upgrade :
            Checking for a new Ubuntu release
            No new release found.
      do-release-upgrade -d :
            Checking for a new Ubuntu release
            Upgrades to the development release are only 
            available from the latest supported release.
       do-release-upgrade -c :
            Checking for a new Ubuntu release
            No new release found.
    

    UPDATE #1

     * Machines are running : Ubuntu 16.04.6 LTS
     * Machines are updated every day by cron (apt update+upgrade)
     * /etc/apt/sources.list.d/ubuntu.list has : 
       deb archive.canonical.com/ubuntu xenial partner 
    
    
    • guiverc
      guiverc over 4 years
      Are the machines fully-upgraded? (ie. to 16.04.6) The "-d" option shouldn't work (as it's for 19.10 to 20.04 which isn't what you want so error message is correct). The first error implies your 16.04 box isn't fully upgraded; next I'd check your sources point to a maintained mirror (launchpad.net/ubuntu/+archivemirrors) and are getting all updates; if they're far behind they may not know 18.04.1 has been released (thus first error messages; ie. No new release found). Also check they haven't been told to not release-upgrade (ie. not set to "none"; admins often do this so not bugged)
    • doug
      doug over 4 years
      With a new 18.04 lts release coming on 2/04 (18.04.4),you'd probably want to wait till then. Whether that's what's interfering don't know but the meta-release file does seem to be fine and the lts URI exists. ( though lists 18.04.3
    • nobody
      nobody over 4 years
      what gives /usr/lib/ubuntu-release-upgrader/check-new-release -qcd
    • Bastion
      Bastion about 4 years
      @nobody - that command gave no output
    • Bastion
      Bastion about 4 years
      @guiverc The machines are running "Ubuntu 16.04.6 LTS"; They're setup to automatically update packages daily (apt update/upgrade);
    • Bastion
      Bastion about 4 years
      @guiverc "check they haven't been told to not release-upgrade" do you mean the setting in /etc/update-manager/release-upgrades ? It is set to Prompt=lts
    • Bastion
      Bastion about 4 years
      @guiverc /etc/apt/sources.list.d/ubuntu.list has : deb archive.canonical.com/ubuntu xenial partner
    • Bastion
      Bastion about 4 years
      @guiverc "Does this answer your question?" - I'm afraid not. I think I've covered everything there in my post (except the last answer where it suggested burning a CD).
    • user535733
      user535733 about 4 years
      Edit your question to show us your complete /etc/apt/sources.list file.
    • Bastion
      Bastion about 4 years
      @user535733 the sources.list file is empty except for a comment, that's why I posted the ubuntu.list file in my question (Update #1). This may well be the issue. I found these two sources.list files for 16.04 LTS - do they look ok to you guys? askubuntu.com/questions/863933/ubuntu-16-04-messed-sources-l‌​ist gist.github.com/rohitrawat/60a04e6ebe4a9ec1203eac3a11d4afc1 Thanks for your help
    • user535733
      user535733 about 4 years
      Yes, missing repositories would cause the problem that you describe. Try this one: How do I restore the default repositories?
  • Kulfy
    Kulfy about 4 years
    While editing the sources.list might upgrade the release but it's not recommended. See Is editing sources.list a good idea?
  • thbz
    thbz about 4 years
    Thanks for the link. But what I understand from reading it is that even do-release-upgrade is not a very good idea. So what I remember is that 1) either do-release-upgrade works out of the box, of 2) do a clean install instead of losing hours trying to understand what's wrong with do-release-upgrade.
  • Bastion
    Bastion about 4 years
    @thbz - Yes. This is the only way me and my colleague have been able to get it working when upgrading from 16.04 LTS. It DID work last year. Something has changed and we don't know what. We have both tried restoring the old sources.list to their expected configuration [ie as per askubuntu.com/questions/124017/… ] but still no success. The error stays the same.
  • Bastion
    Bastion about 4 years
    I may have to take this as the answer since nothing else works, although I am explicitly requesting a solution that fixes the do-release-upgrade process. We could try debugging /usr/bin/do-release-upgrade but I don't think I really have time for that ..
  • PanDe
    PanDe over 2 years
    This still works as the answer for last resort which I had to use because nothing else worked for me.