Menu Close

Chapter 8. Removing RHEL 9 content

The following sections describe how to remove content in Red Hat Enterprise Linux 9:

8.1. Removing installed packages

The following procedure describes how to remove packages using dnf.

Procedure

  • To remove a particular package and all unused dependent packages, use:

    # dnf remove package-name

    Replace package-name with the name of the package.

    Note that the package is removed together with any other dependent packages.

  • To remove multiple packages and their unused dependencies simultaneously, use:

    # dnf remove package-name-1 package-name-2

    Replace package-name-1 and package-name-2 with the names of the packages.

Note

dnf is not able to remove a package without removing dependent packages.

8.2. Removing package groups

The following procedure describes how to remove a package either by the group name or the groupID.

Procedure

  • To remove a package group by the group name, use:

    # dnf group remove group-name

    Replace group-name with the full name of the group.

  • To remove a package group by the groupID, use:

    # dnf group remove groupID

    Replace groupID with the ID of the group.

8.3. Additional resources