DNF und seine APT-Befehlsäquivalente unter Fedora
APT is the package manager/dependency solver for the Debian ecosystem, i.e. it manages .deb packages installed by the DPKG program. Fedora software is based on .rpm packages, and therefore uses DNF, the package manager/dependency solver for the RPM program, instead. This document gives a brief overview of the most common APT commands one might find in tutorials and their DNF equivalents.
APT compared to DNF commands
| APT command | DNF command | notes |
|---|---|---|
|
|
Of course, actual package names may vary. For example, |
|
|
Updates only already installed package and its dependencies. The |
|
|
This command is rarely needed, as dnf updates its package cache automatically when it is stale. A cache update can be forced by appending |
|
|
Note that while |
|
|
While |
|
|
|
|
--- |
Fedora packages do not treat configuration files in the same way as Debian packages, so there is no direct equivalent. |
|
|
Note that this can occasionally remove packages that you might actually want. Use |
|
|
|
Abgesehen davon, dass die Systemaktualisierung der Distribution anders funktioniert und DNF den Zwischenspeicher automatisch aktualisiert, sind die Befehle sehr ähnlich. Weitere Informationen zu DNF finden Sie hier.
Why is APT in the Fedora repositories
| APT kann nicht zur Installation von Paketen unter Fedora verwendet werden, Sie müssen stattdessen DNF verwenden. |
The apt command on Fedora used to — until Fedora 32 — actually be APT-RPM, which mapped normal apt commands so that they worked with Fedora’s RPM package management system.
Da APT-RPM jedoch nicht mehr gewartet wird, fehlerhaft und unsicher ist, wurde es zugunsten der eigentlichen Debian-APT-Software verworfen. Da APT ausschließlich mit .deb-Paketen arbeitet, kann der Befehl apt nicht mehr zur Verwaltung von Fedora-Paketen verwendet werden. Er dient nun ausschließlich als Werkzeug für Entwickler, die Pakete für Debian-basierte Distributionen auf einem Fedora-System erstellen.
Want to help? Learn how to contribute to Fedora Docs ›