Amazon Linux 2023

amazon-linux-extras: command not found

amazon-linux-extras: command not found

What it means

The amazon-linux-extras mechanism was removed in Amazon Linux 2023; it only exists on Amazon Linux 2.

Why it happens

Amazon Linux 2023 dropped the Extras Library. Packages that used to live behind amazon-linux-extras are now either default dnf packages, version-namespaced packages (e.g. python3.11, nginx1.24), or available through SPAL (Supplementary Packages for Amazon Linux).

How to fix it

  1. Stop calling amazon-linux-extras — it does not exist on AL2023.
  2. Install the package directly with dnf, e.g. `sudo dnf install -y python3.11`.
  3. For a specific minor version, use the version-namespaced package name (python3.11, nginx1.24, postgresql15, etc.).
  4. For packages that were EPEL-backed, enable SPAL instead of the old extras topics.
  5. Update Dockerfiles and user-data scripts that still run `amazon-linux-extras enable ...` / `install`.

Related deadline: Amazon Linux 2 EOL2026-06-30.

Find every instance in your project

The free EOLkits scanner runs in your browser (nothing uploaded) and flags this and related breakages across your IaC and dependency files.

Primary source: https://docs.aws.amazon.com/linux/al2023/ug/compare-with-al2.html

Get the full migration audit — $299, hash-anchored PDF →