DNF is a new RPM-based package manager that replaced YUM, as YUM was affected by some performance issues and inefficient dependency resolving methods.

Its CLI interface is pretty intuitive:

# dnf [options] <command> [<argument>]

Although you can check man dnf to have a close look at its manual here are the basics of DNF:

# dnf search <package_name>
# dnf install <package_name>
# dnf remove <package_name>
# dnf upgrade [<package_name>]

And a quick look at groups management:

# dnf group install <group_name>
# dnf group upgrade <group_name>
# dnf group remove <group_name>

Now something more advanced (if you’re interested in playing around):

  • If you have many repositories enabled or one is giving you troubles you probably want to list them:
    dnf repolist all
  • List packages filtering by category and optional wildcard:
    dnf list [a_category_below] [optional_wildcard]
    • all: every package in every repository
    • installed: installed packages (more fyi: RPMDB)
    • available: listed in repos but not installed
    • extras: installed but from unknown repository
    • upgrades: with an upgrade available (see obsoletes too)

    eg. dnf list installed kernel* will list every installed kernel.

  • DNF has some powerful history commands. Use:
    # dnf history list

    to list every transaction, and undo/redo/rollback/info to interact with it:

    # dnf history undo <transaction_id>

Source: DNF man page (online version)


Share and comment!

Advertisements