Tooladvanced
Other system package managers
Also called dnf, yum, RPM, pacman, apk, Alpine Package Keeper, winget, Windows Package Manager, Chocolatey, choco, Scoop, MacPorts, port, FreeBSD pkg, FreeBSD Ports Collection.
dnf, pacman and apk install packages on Linux, winget, Chocolatey and Scoop on Windows, MacPorts on macOS, and pkg on FreeBSD. They install software for the whole computer.
- Role
- package-manager
What it is
Each operating system has its own way to install software. This page describes the system package managers that are not on the pages APT (Debian and Ubuntu), Homebrew (macOS and Linux) and Nix. The general ideas are on Package manager.
| System | Tool | What it installs |
|---|---|---|
| RPM-based Linux | dnf | RPM packages; dnf is the major version of YUM that came after it1 |
| Arch Linux | pacman | packages in a zipped tar format2 |
| Alpine Linux | apk | packages from the Alpine repositories3 |
| openSUSE | zypper | packages from the configured repositories4 |
| Windows | winget | applications, through the Windows Package Manager service5 |
| Windows | Chocolatey | software packages, with PowerShell6 |
| Windows | Scoop | apps, installed from the command line7 |
| macOS | MacPorts | open source software, built from ports8 |
| FreeBSD | pkg and the Ports Collection | pre-built packages, or software built from source9 |
dnf, pacman and apk install the dependencies of a package too.123 A language package manager, such as RubyGems or Composer, works for one project; a system package manager works for the whole computer.
Install and first use
WinGet comes with Windows 11, Windows Server 2025 and some versions of Windows 10, as a part of the App Installer.5 For the other tools, see the installation steps in their documentation. The commands below change the system, so this page shows them as text and does not run them.
dnf. dnf install makes sure that the packages that you give, and their dependencies, are installed on the system.1
sudo dnf install PACKAGE
pacman. The operation -S (sync) installs packages from the remote repositories, with all the dependencies that they need to run. pacman -Syu updates the package list and then upgrades all packages.2
sudo pacman -S qt
sudo pacman -Syu
apk. apk add adds packages, and you can give more than one at a time. apk upgrade is two steps: apk update downloads the package index, and then the packages in the world are upgraded with their dependencies.3
apk add bash zsh
apk update
apk upgrade
zypper. The openSUSE reference calls Zypper "a command line package manager for installing, updating, and removing packages".4 zypper update updates all installed packages, but it ignores problematic packages: for example, it does not update a locked package.4
sudo zypper install PACKAGE_NAME
sudo zypper remove PACKAGE_NAME
sudo zypper update
winget. winget search finds an application, and winget install starts its installer.5
winget search <appname>
winget install <appname>
Chocolatey. The guide says to open PowerShell as an administrator, because almost all software needs administrative privilege to install, upgrade or uninstall.6
choco install notepadplusplus -y
choco upgrade notepadplusplus -y
Scoop. Scoop installs apps from the command line. It avoids the User Account Control prompts and the wizards of graphical installers, and it does not fill the PATH with entries.7
scoop install python ruby go perl
scoop bucket add extras
MacPorts. port selfupdate updates the local ports tree from the MacPorts repository and upgrades MacPorts itself when necessary. port install installs a port.8
sudo port selfupdate
sudo port install apache2
FreeBSD pkg. pkg install installs a binary package. pkg upgrade compares the installed versions with those in the repository catalogue and upgrades them.9
pkg install PACKAGE
pkg upgrade
Concepts of the tool
Binary packages and building from source. FreeBSD has two complementary ways to install third-party software: the Ports Collection builds from source, and packages are pre-built binaries.9 MacPorts is a system "for compiling, installing, and managing open source software". A port is a set of specifications in a file Portfile.8
Repositories. apk gets the package information and the packages from mirrors. A mirror is a website that hosts repositories, and a repository is a category of packages.3 Scoop calls its repositories buckets: scoop bucket add extras adds the bucket extras.7 pacman can sync the local machine with a remote repository to upgrade packages.2
The packages that you asked for. apk lists the packages that you installed on purpose in the "world file", /etc/apk/world. The handbook says that it is safe to edit it by hand; after an edit, apk add with no arguments brings the system to a consistent state.3 A virtual package groups other packages: apk add a b c -t abc adds a, b and c as the dependencies of abc, and apk del abc removes all of them, unless something else needs them.3
History. dnf history shows what happened in past transactions, and can act on that information.1
Front ends and libraries. pacman 3.0.0 and later versions are a front end to the library libalpm, so other front ends can be written for the same library.2 DNF has an API for extensions and plugins, and a plugin can add commands.1
Common tasks
| Task | dnf | pacman | apk | winget | MacPorts | FreeBSD pkg |
|---|---|---|---|---|---|---|
| Install | dnf install P1 |
pacman -S P2 |
apk add P3 |
winget install P5 |
port install P8 |
pkg install P9 |
| Remove | dnf remove P1 |
pacman -R P2 |
apk del P3 |
port uninstall P8 |
||
| Upgrade all | dnf upgrade1 |
pacman -Syu2 |
apk upgrade3 |
port selfupdate, then upgrade8 |
pkg upgrade9 |
|
| Search | winget search P5 |
port search P8 |
An empty cell means that the source of this page does not give the command, not that the tool has no such command.
Configuration
- pacman: the file
pacman.conf.2 - apk: the world file
/etc/apk/world.3 - Scoop: the buckets, which
scoop bucket addadds.7 - MacPorts: the variants of a port, for example
sudo port install apache2 -preforkmpm +workermpm, and the filevariants.conf.8
Alternatives
APT is the system package manager of Debian and Ubuntu. Homebrew works on macOS and Linux without root after its installation. Nix keeps each version of a package in its own path, so versions do not conflict. For the libraries of a project, use the package manager of the language: see Other language package managers and C and C++ package managers.
History and versions
The sources of this page give few dates. Two version facts are in them: pacman became a front end to libalpm in version 3.0.0,2 and DNF is the major version of YUM that came after it, and it keeps the command line of YUM roughly the same.1
References
- DNF Command Reference, Description; Install Command; History Command; Autoremove Command
- Arch manual pages, pacman(8), DESCRIPTION; -S, --sync; -R, --remove; EXAMPLES
- Alpine Linux User Handbook, Working with the Alpine Package Keeper (apk), Repositories, Releases and Mirrors; Adding Packages; World; Upgrading; Virtual Packages
- Managing software with command line tools, openSUSE Leap 15.6 Reference, Using Zypper; Installing and removing software with Zypper; Updating software with Zypper
- Microsoft Learn, Use WinGet to install and manage applications, the introduction; Use WinGet
- Chocolatey documentation, Getting Started, Requirements; Installing and upgrading a package
- Scoop, README, What does Scoop do?; Known application buckets
- MacPorts Guide, Chapter 1, Introduction; port selfupdate; port install
- FreeBSD Handbook, Chapter 4, Installing Applications, Packages and Ports, Synopsis; Using pkg for Binary Package Management; Upgrading Installed Packages
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W3 standard |
|
Tag S6CMT5 Edit this page History Report an error Markdown