1

I want to programmatically obtain the list of all Ubuntu series, in release order (preferably via a URL). If I obtained the list say around July 2024, it would show

oracular, noble, mantic,..., warty

whereas the list as of November 2024 would be

plucky, oracular, noble, mantic,..., warty

Looking at the Launchpad web service I can obtain the published binaries for the user canonical-kernel-team using https://api.launchpad.net/1.0/~canonical-kernel-team/+archive/ubuntu/ppa?ws.op=getPublishedBinaries&status=Published but that is as far as I can get...and I don't want a specific user/project, rather I want the list of all series.

Also, I am also concerned that if the API above can be used, it is perhaps obsolete as there is a reference to EOL circa April 2015.

Bernmeister
  • 1,149

1 Answers1

1

Thanks to @muru I managed to find the appropriate URLs/files and cobbled together:

def get_series( url ):
    try:
        with urlopen( url ) as f:
            for line in f.read().decode().splitlines():
                if "Dist:" in line:
                    s = line.split()[ 1 ]
                    if s not in series:
                        series.insert( 0, s )
except URLError as e:
    print( e )


series = [ ] get_series( "https://changelogs.ubuntu.com/meta-release" ) get_series( "https://changelogs.ubuntu.com/meta-release-development" ) print( series )

to give

['plucky', 'oracular', 'noble', 'mantic', 'lunar', 'kinetic', 'jammy', 'impish', 'hirsute', 'groovy', 'focal', 'eoan', 'disco', 'cosmic', 'bionic', 'artful', 'zesty', 'yakkety', 'xenial', 'wily', 'vivid', 'utopic', 'trusty', 'saucy', 'raring', 'quantal', 'precise', 'oneiric', 'natty', 'maverick', 'lucid', 'karmic', 'jaunty', 'intrepid', 'hardy', 'gutsy', 'feisty', 'edgy', 'dapper', 'breezy', 'hoary', 'warty']
Bernmeister
  • 1,149