mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-24 13:32:42 +00:00
expand instructions for apt users
This commit is contained in:
parent
627e4a0b80
commit
96032d5627
1 changed files with 17 additions and 9 deletions
|
@ -8,19 +8,27 @@ APT is the package manager/dependency solver for the Debian ecosystem, i.e. it m
|
|||
|===
|
||||
| APT command | DNF command | notes
|
||||
|
||||
| `apt install`
|
||||
|
||||
`apt-get install`
|
||||
|
||||
| `dnf install`
|
||||
|
||||
| Of course, actual package names may vary. For example, `libc6-dev` on Debian maps to `glibc-devel` in the Fedora universe.
|
||||
|
||||
| `apt update`
|
||||
|
||||
`apt-get update`
|
||||
|
||||
| `dnf check-update`
|
||||
| This command is rarely needed, as dnf updates its package cache automatically when it is stale. A cache update can be forced by appending `--refresh` to other commands, e.g. `dnf upgrade --refresh`
|
||||
| This command is rarely needed, as dnf updates its package cache automatically when it is stale. A cache update can be forced by appending `--refresh` to other commands, e.g. `dnf upgrade --refresh`.
|
||||
|
||||
| `apt upgrade`
|
||||
|
||||
`apt-get upgrade`
|
||||
|
||||
| `dnf upgrade`
|
||||
|
|
||||
| Note that while `apt update` does something different, `dnf update` and `dnf upgrade` are synonyms. You can also use the shorter `dnf up`.
|
||||
|
||||
| `apt full-upgrade`
|
||||
|
||||
|
@ -30,7 +38,7 @@ APT is the package manager/dependency solver for the Debian ecosystem, i.e. it m
|
|||
|
||||
`dnf system-upgrade` (see note)
|
||||
|
||||
| While `distro-sync` is the most direct functional equivalent, `dnf system-upgrade` should be used to upgrade from one release to another, e.g. from Fedora 31 to 32. This is a multi-step process as described xref:dnf-system-upgrade.adoc[here].
|
||||
| While `distro-sync` is the most direct functional equivalent, `dnf system-upgrade` should be used to upgrade from one release to another, e.g. from Fedora Linux 34 to 35. This is a multi-step process as described xref:dnf-system-upgrade.adoc[here].
|
||||
|
||||
| `apt remove`
|
||||
|
||||
|
@ -44,31 +52,31 @@ APT is the package manager/dependency solver for the Debian ecosystem, i.e. it m
|
|||
`apt-get purge`
|
||||
|
||||
| ---
|
||||
|
|
||||
| Fedora packages don't treat configuration files in the same way as Debian packages, so there is no direct equivalent.
|
||||
|
||||
| `apt autoremove`
|
||||
|
||||
`apt-get autoremove`
|
||||
|
||||
| `dnf autoremove`
|
||||
|
|
||||
| Note that this can occasionally remove packages that you might actually want. Use `dnf mark` to flag packages to keep.
|
||||
|
||||
| `apt search`
|
||||
|
||||
`apt-cache search`
|
||||
|
||||
| `dnf search`
|
||||
|
|
||||
| `dnf repoquery` is useful for advanced searches.
|
||||
|
||||
|===
|
||||
|
||||
With the exception of the distribution upgrade working differently and DNF updating the cache automatically, the commands are very similar. More info on DNF can be found xref:dnf.adoc[here].
|
||||
With the exceptions of the distribution upgrade working differently, and DNF updating the cache automatically, the commands are very similar. More info on DNF can be found xref:dnf.adoc[here].
|
||||
|
||||
== Why is APT in the Fedora repositories?
|
||||
|
||||
WARNING: APT *can not* be used to install packages on Fedora, you *have to use DNF* instead.
|
||||
|
||||
The `apt` command on Fedora used to - until https://fedoraproject.org/wiki/Changes/Move_apt_package_from_RPM_to_DPKG_backend[Fedora 32] - actually be APT-RPM, which basically mapped normal apt commands so that they worked with Fedora's RPM package management system.
|
||||
The `apt` command on Fedora used to -- until https://fedoraproject.org/wiki/Changes/Move_apt_package_from_RPM_to_DPKG_backend[Fedora 32] -- actually be APT-RPM, which basically mapped normal apt commands so that they worked with Fedora's RPM package management system.
|
||||
|
||||
However, APT-RPM is unmaintained, broken & insecure, and so was dropped in favour of shipping the actual Debian APT software. Since APT exclusively deals with `.deb` packages, the `apt` command can no longer be used to manage Fedora packages. Its purpose is now purely as a tool for people building packages for Debian-based distributions on a Fedora system.
|
||||
However, APT-RPM is unmaintained, broken, and insecure, and so was dropped in favour of shipping the actual Debian APT software. Since APT exclusively deals with `.deb` packages, the `apt` command can no longer be used to manage Fedora packages. Its purpose is now purely as a tool for people building packages for Debian-based distributions on a Fedora system.
|
||||
|
||||
|
|
Loading…
Reference in a new issue