Package management tool - Amazon Linux 2022
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Amazon Linux 2022 is in preview release and is subject to change.

Package management tool

In Amazon Linux 2022 (AL2022), the default software package management tool is DNF. DNF is the successor to YUM, the package management tool in Amazon Linux 2.

DNF is similar to YUM in its usage. Many DNF commands are the same and with the same options as YUM commands. In a Command Line Interface (CLI) command, in most cases dnf replaces yum.

For example, for the following Amazon Linux 2 yum commands:

$ sudo yum install packagename $ sudo yum search packagename $ sudo yum remove packagename

In Amazon Linux 2022, they become these commands:

$ sudo dnf install packagename $ sudo dnf search packagename $ sudo dnf remove packagename

Many of the dnf commands and yum commands are the same. In Amazon Linux 2022 the yum command is still available, but as a pointer to the dnf command. So, when the yum command is used in the shell or in a script, all commands and options are the same as the DNF CLI. For more information about the differences between the YUM CLI and the DNF CLI, see Changes in DNF CLI compared to YUM.

For a complete reference of commands and options for the dnf command, refer to the man page man dnf. For more information, see DNF Command Reference