DEV Community

Cover image for YUM TO DNF: Amazon Linux_2023 Package Manager.
Giri Dharan
Giri Dharan

Posted on

YUM TO DNF: Amazon Linux_2023 Package Manager.

Amazon Linux changed its package manager from yum to DNF starting with Amazon Linux 2023 (AL2023). The main motivation for this change was to adopt the more modern, efficient, and secure package manager that DNF provides, which is now the standard across most Red Hat-based distributions.

Reasons for the Change

  • DNF (Dandified YUM) is the successor to yum and offers major improvements:

    • Faster and more reliable dependency resolution, thanks to a new dependency solver and persistent metadata cache.
    • Improved performance and lower system resource usage compared to yum.
    • Enhanced support for parallel operations, extension/plugin development, and delta RPMs for better update efficiency.
    • A stricter and more predictable API, facilitating the development of automation and third-party integrations.
    • More robust security and better memory management.
    • Aligning with industry standards, as DNF had already replaced yum as the default in Fedora (since version 22), CentOS (version 8+), Rocky Linux, and RHEL 8+.

When Was the Change Made?

  • The transition occurred with the release of Amazon Linux 2023 (AL2023). Earlier releases, like Amazon Linux 2 (AL2), used yum as the default package manager.

  • From AL2023 onward, all yum-like commands should be executed using dnf. The commands remain almost identical, ensuring backward compatibility for users transitioning from yum to dnf.

Summary Table: Amazon Linux Package Manager Evolution

Version Package Manager Reason for Switch First Released
Amazon Linux 2 yum Older, less efficient dependency handling 2017
Amazon Linux 2023 dnf Modern, faster, secure, aligns with RHEL 2022

Every major Red Hat-based Linux distribution has shifted to DNF for improved reliability, performance, and future compatibility, making it the logical default for Amazon Linux going forward.

Top comments (0)