This PR significantly overhauls the "Adding and managing software" section of Fedora Quick Docs, bringing it up to date for currently supported releases (Fedora 41 and newer, using DNF5) and restructuring the navigation for clarity. *Navigation restructure* The section is reorganised into three clear areas: core package management topics, a third-party software subsection, and a new "Installing popular applications" group. Topics covering specific applications (VLC, Spotify, Zoom, Chromium, Java, fonts, desktop environments) are grouped separately from package management mechanics. openh264.adoc is retired and its content is merged into the multimedia plugins page. Also, I separated out legal content and put that under the FAQ section and did away with the remaining content in packagekit-not-found.adoc because this was consolidated into some newer topics described below. *New topics* I added several new topics: - Third-party software: overview of the distinction between Fedora release software and third-party sources, why software may be absent (patents, licensing, unpackaged), and safe usage practices - Flatpak / Flathub: installing and managing Flatpak applications, covering both GNOME Software and KDE Discover - Snap Store: installing and managing Snap applications - AppImage: running portable AppImage applications - Language package managers: pip, npm, Cargo, gem, and go install, with emphasis on isolation (virtual environments) and the preference for Fedora-packaged versions - ~~Managing software on immutable Fedora editions: rpm-ostree layering, Flatpak as the preferred app delivery method, and Toolbox for development environments~~ - Creating a DNF repository mirror: using dnf reposync to set up a local mirror, serving it with Apache, configuring clients, and keeping it current with a systemd timer - Fedora and software patents: split out from the retired packagekit-not-found.adoc into its own FAQ topic *Updated topics* - autoupdates.adoc: restructured (decision first, setup second), dnf-automatic.timer updated for DNF5 (single timer replaces the old per-mode timers), machine → system throughout, auter section retained and updated - package-management.adoc: rewritten to be a concise intro rather than a stub with broken links - securing-the-system-by-keeping-it-up-to-date.adoc: recommends dnf offline-upgrade over updating a live system; redundant automatic updates section replaced with an xref to autoupdates.adoc - installing-java.adoc: Java version updated (LTS: 21, 25; latest: 26); JDK components list pruned of tools removed in JDK 9–14; modern tools added (jshell, jlink, jpackage, jdeps, jhsdb); dead links fixed (Freenode → Libera.Chat, Mailman → Fedora Discussion, openjdk.java.net → openjdk.org) - installing-plugins-for-playing-movies-and-music.adoc: updated for F41+; OpenH264 content merged in; RPM Fusion noted for extended codec support; immutable editions section added; Fedora Workstation multimedia group updated - installing-chromium-or-google-chrome-browsers.adoc: DNF4 old-syntax block removed; chromium-freeworld from RPM Fusion noted for users needing full codec support; screenshots updated for current GNOME Software and Plasma Discover UI - fonts.adoc: rewritten for current Fedora; GNOME Font Viewer bug note removed; KDE section updated for Plasma 6; RPM Fusion font source note corrected; code block formatting fixed - finding-and-installing-linux-applications.adoc: repository overview section removed (now links to dedicated topics); GNOME and KDE GUI walkthroughs updated with fresh screenshots on Fedora 42 with GNOME 50 and Plasma 6; category descriptions corrected to match actual UI - switching-desktop-environments.adoc : renamed "Installing and Switching Desktop Environments"; updated for Fedora 41+ (single dnf environment list command) --- worth noting that although I could install switchdesk it didn't really work properly in my test lab. - fedora-and-software-patents.adoc: dead links removed (Fluendo, 2007–2010 Red Hat press releases, old mailing list); MP3 no longer referenced as patent-encumbered (patents expired 2017) *Style and consistency pass* All topics in the section were run through the Red Hat Vale linter. Changes include: contractions expanded, passive voice reduced, heading capitalisation normalised (sentence case for H2+), code blocks annotated with [source,bash,console] and $/$ sudo prompts, e.g./i.e. replaced with for example/that is, and Fedora-specific vocabulary added to the Vale exceptions file. *Screenshots* All screenshots in finding-and-installing-linux-applications.adoc are retaken on Fedora 42 (GNOME 50 and Plasma 6), replacing images from the older Fedora releases. Reviewed-on: #969
5.6 KiB
DNF is a software package manager that installs, updates, and removes packages on Fedora and is the successor to YUM (Yellow-Dog Updater Modified).
DNF makes it easy to maintain packages by automatically checking for dependencies and determines the actions required to install packages.
This method eliminates the need to manually install or update the package, and its dependencies, using the rpm command.
DNF is now the default software package management tool in Fedora.
|
Note
|
DNF applies to standard Fedora editions. On image-based variants such as the Fedora Atomic Desktops and Fedora CoreOS, package management works differently. See the Fedora Atomic Desktops User Guide for details. |
Usage
dnf can be used exactly as yum to search, install or remove packages.
To search the repositories for a package type:
$ dnf search packagename
To install the package:
$ sudo dnf install packagename
To remove a package:
$ sudo dnf remove packagename
Other common DNF commands include:
-
autoremove- removes packages installed as dependencies that are no longer required by currently installed programs. -
check-update- checks for updates, but does not download or install the packages. -
downgrade- reverts to the previous version of a package. -
info- provides basic information about the package including name, version, release, and description. -
reinstall- reinstalls the currently installed package. -
upgrade- checks the repositories for newer packages and updates them. -
exclude- exclude a package from the transaction.
For more DNF commands refer to the man pages by typing man dnf at the command-line, or DNF Read The Docs
Automatic Updates
The dnf-automatic package is a component that allows automatic download and installation of updates.
It can automatically monitor and report, via email, the availability of updates or send a log about downloaded packages and installed updates.
For more information, refer to the Read the Docs: DNF-Automatic page.
System Upgrades
The Fedora system can be upgraded directly with DNF, or with the DNF system upgrade plugin. Refer to the DNF System Upgrade document for more details.
Language Support Using DNF
DNF can be used to install or remove Language Support. A detailed description with a list of available languages can be found on Language Support Using Dnf page.
Plugins
The core DNF functionality can be extended with plugins. There are officially supported Core DNF plugins and also third-party Extras DNF Plugins. To install them, run
$ sudo dnf install dnf-plugins-core-PLUGIN_NAME
or
$ sudo dnf install dnf-plugins-extras-PLUGIN_NAME
Excluding Packages From Transactions
Sometimes it is useful to ignore specific packages from transactions, such as updates. One such case, for example, could be when an update includes a regression or a bug. DNF allows you to exclude a package from the transaction:
-
using the command line
$ sudo dnf upgrade --exclude=packagename
-
using its configuration files
You can add a line to /etc/dnf/dnf.conf to exclude packages:
excludepkgs=packagename
This can also be added to the specific repository configuration files in /etc/yum.repos.d/.
Globs may be used here to list multiple packages, and each specification must be separated by a comma.
If you have used this configuration, you can disable it in individual DNF commands using the --disableexcludes command line switch.
If you use a GUI update application which does not allow you to specify packages to exclude when they run, this method can be used.
Using the DNF Versionlock plugin
You can also use the DNF versionlock plugin to limit the packages that are included in a transaction.
It allows you to list what versions of particular packages should be considered in a transaction.
All other versions of the specified packages will be ignored.
The plugin is part of dnf-plugins-core package and can be installed using the command below:
$ sudo dnf install 'dnf-command(versionlock)'
To lock the currently installed version of a package, use:
$ sudo dnf versionlock add package
To remove the version lock, use:
$ sudo dnf versionlock delete package
The list command can be used to list all locked packages, while the clear command will delete all locked entries.