Search code examples
aptubuntu-19.04

sources.list corrections to upgrade from Ubuntu 19.04 to 19.10 / "old-release"


$ cat /etc/apt/sources.list
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb https://old-releases.ubuntu.com/releases/ focal main restricted
deb-src https://old-releases.ubuntu.com/releases/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb https://old-releases.ubuntu.com/releases/ focal-updates main restricted
deb-src https://old-releases.ubuntu.com/releases/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb https://old-releases.ubuntu.com/releases/ focal universe
deb-src https://old-releases.ubuntu.com/releases/ focal universe
deb https://old-releases.ubuntu.com/releases/ focal-updates universe
deb-src https://old-releases.ubuntu.com/releases/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb https://old-releases.ubuntu.com/releases/ focal multiverse
deb-src https://old-releases.ubuntu.com/releases/ focal multiverse
deb https://old-releases.ubuntu.com/releases/ focal-updates multiverse
deb-src https://old-releases.ubuntu.com/releases/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb https://old-releases.ubuntu.com/releases/ focal-backports main restricted universe multiverse
deb-src https://old-releases.ubuntu.com/releases/ focal-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb https://old-releases.canonical.com/ubuntu wily partner
# deb-src https://old-releases.canonical.com/ubuntu wily partner

This what I get when trying to update:

$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:2 https://old-releases.ubuntu.com/releases focal InRelease
Ign:3 https://old-releases.ubuntu.com/releases focal-updates InRelease
Ign:4 https://old-releases.ubuntu.com/releases focal-backports InRelease
Err:5 https://old-releases.ubuntu.com/releases focal Release
  404  Not Found [IP: 91.189.91.124 443]
Err:6 https://old-releases.ubuntu.com/releases focal-updates Release
  404  Not Found [IP: 91.189.91.124 443]
Err:7 https://old-releases.ubuntu.com/releases focal-backports Release
  404  Not Found [IP: 91.189.91.124 443]
Reading package lists... Done
E: The repository 'https://old-releases.ubuntu.com/releases focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://old-releases.ubuntu.com/releases focal-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://old-releases.ubuntu.com/releases focal-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Next I'll want to run apt dist-upgrade. I am unsure if sources.list.distUpgrade will be updated automagically by apt, or if that needs to be corrected also. This is what I currently have:

$ cat /etc/apt/sources.list.distUpgrade
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See https://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic main restricted
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates main restricted
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic universe
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic universe
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates universe
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic multiverse
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic multiverse
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates multiverse
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
deb-src https://us-east-1.ec2.archive.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse

deb https://security.ubuntu.com/ubuntu cosmic-security main restricted
deb-src https://security.ubuntu.com/ubuntu cosmic-security main restricted
deb https://security.ubuntu.com/ubuntu cosmic-security universe
deb-src https://security.ubuntu.com/ubuntu cosmic-security universe
deb https://security.ubuntu.com/ubuntu cosmic-security multiverse
deb-src https://security.ubuntu.com/ubuntu cosmic-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb https://archive.canonical.com/ubuntu wily partner
# deb-src https://archive.canonical.com/ubuntu wily partner

Solution

  • No documentation exists for the changing contents of /etc/apt/sources.list. From trial and error, as of this date, the following is correct.

    ## Note, this file is written by cloud-init on first boot of an instance
    ## modifications made here will not survive a re-bundle.
    ## if you wish to make changes you can:
    ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
    ##     or do the same in user-data
    ## b.) add sources in /etc/apt/sources.list.d
    ## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
    
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://archive.ubuntu.com/ubuntu/ focal main restricted
    deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
    deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://archive.ubuntu.com/ubuntu/ focal universe
    deb-src http://archive.ubuntu.com/ubuntu/ focal universe
    deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
    deb-src http://archive.ubuntu.com/ubuntu/ focal-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://archive.ubuntu.com/ubuntu/ focal multiverse
    deb-src http://archive.ubuntu.com/ubuntu/ focal multiverse
    deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
    deb-src http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
    deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
    
    deb http://security.ubuntu.com/ubuntu focal-security main restricted
    deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
    deb http://security.ubuntu.com/ubuntu focal-security universe
    deb-src http://security.ubuntu.com/ubuntu focal-security universe
    deb http://security.ubuntu.com/ubuntu focal-security multiverse
    deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu wily partner
    # deb-src http://archive.canonical.com/ubuntu wily partner