distro_info - provides information about Ubuntu's and Debian's distributions
| Use Case | Command | Description |
|---|---|---|
| Get latest stable Ubuntu | UbuntuDistroInfo().stable() | Returns codename of latest stable Ubuntu release |
| Get latest stable Debian | DebianDistroInfo().stable() | Returns codename of latest stable Debian release |
| Check if a codename is valid | UbuntuDistroInfo().valid('focal') | Returns True if codename is known |
| Get all supported Ubuntu releases | UbuntuDistroInfo().supported() | Returns list of supported codenames |
| Convert codename to version | info.version('focal') | Returns version string like '20.04' |
| Get LTS Ubuntu release | UbuntuDistroInfo().lts() | Returns codename of latest LTS |
| Check if release is LTS | UbuntuDistroInfo().is_lts('jammy') | Returns boolean |
| Get development (devel) release | info.devel() | Returns codename of latest development release |
builtins.Exception(builtins.BaseException) → DistroDataOutdated
builtins.object → DistroInfo → DebianDistroInfo, UbuntuDistroInfo, DistroRelease
class DebianDistroInfo(DistroInfo) — provides information about Debian's distributions
Method resolution order: DebianDistroInfo, DistroInfo, builtins.object
__init__(self) — Initialize self.codename(self, release, date=None, default=None) — Map 'unstable', 'testing', etc. to their codenames.devel(self, date=None, result='codename') — Get latest development distribution based on the given date.elts_supported(self, date=None, result='codename') — Get list of all Extended LTS supported Debian distributions based on the given date.lts_supported(self, date=None, result='codename') — Get list of all LTS supported Debian distributions based on the given date.old(self, date=None, result='codename') — Get old (stable) Debian distribution based on the given date.supported(self, date=None, result='codename') — Get list of all supported Debian distributions based on the given date.testing(self, date=None, result='codename') — Get latest testing Debian distribution based on the given date.valid(self, codename) — Check if the given codename is known.Methods inherited from DistroInfo:
get_all(self, result='codename') — List all known distributions.stable(self, date=None, result='codename') — Get latest stable distribution based on the given date.unsupported(self, date=None, result='codename') — Get list of all unsupported distributions based on the given date.version(self, name, default=None) — Map codename or series to version.Readonly properties inherited from DistroInfo:
all — List codenames of all known distributions.Data descriptors inherited from DistroInfo: __dict__, __weakref__
class DistroDataOutdated(builtins.Exception) — Distribution data outdated.
Methods defined here:
__init__(self) — Initialize self.Data descriptors defined here: __weakref__
Static methods inherited from builtins.Exception: __new__(*args, **kwargs) from builtins.type
Methods inherited from builtins.BaseException: __delattr__, __getattribute__, __reduce__, __repr__, __setattr__, __setstate__, __str__, with_traceback
Data descriptors inherited from builtins.BaseException: __cause__, __context__, __dict__, __suppress_context__, __traceback__, args
class DistroInfo(builtins.object) — Base class for distribution information.
Methods defined here:
__init__(self, distro) — Initialize self.codename(self, release, date=None, default=None) — Map codename aliases to the codename they describe.devel(self, date=None, result='codename') — Get latest development distribution based on the given date.get_all(self, result='codename') — List all known distributions.stable(self, date=None, result='codename') — Get latest stable distribution based on the given date.supported(self, date=None, result=None) — Get list of all supported distributions based on the given date.unsupported(self, date=None, result='codename') — Get list of all unsupported distributions based on the given date.valid(self, codename) — Check if the given codename is known.version(self, name, default=None) — Map codename or series to version.Readonly properties defined here:
all — List codenames of all known distributions.Data descriptors defined here: __dict__, __weakref__
class DistroRelease(builtins.object) — Represents a distribution release.
Methods defined here:
__init__(self, version, codename, series, created=None, release=None, eol=None, eol_esm=None, eol_lts=None, eol_elts=None, eol_server=None) — Initialize self.is_supported(self, date) — Check whether this release is supported on the given date.Data descriptors defined here: __dict__, __weakref__
class UbuntuDistroInfo(DistroInfo) — provides information about Ubuntu's distributions
Method resolution order: UbuntuDistroInfo, DistroInfo, builtins.object
__init__(self) — Initialize self.is_lts(self, codename) — Is codename an LTS release?lts(self, date=None, result='codename') — Get latest long term support (LTS) Ubuntu distribution based on the given date.supported(self, date=None, result='codename') — Get list of all supported Ubuntu distributions based on the given date.supported_esm(self, date=None, result='codename') — Get list of all ESM supported Ubuntu distributions based on the given date.Methods inherited from DistroInfo: codename, devel, get_all, stable, unsupported, valid, version
Readonly properties inherited from DistroInfo: all
Data descriptors inherited from DistroInfo: __dict__, __weakref__
convert_date(string) — Convert a date string in ISO 8601 into a datetime object.
/usr/lib/python3/dist-packages/distro_info.py
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-01 17:00 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)