Package Managers in Linux and Windows
Linux Package Managers
APT
Debian's package manager, APT, is powerful, easy to use, and fast. You can find APT on Ubuntu, Linux Mint, Deepin, Linux on Chromebook, and many other distros that are based on Debian.
Update Repo | apt update |
Upgrade/Update packages | apt upgrade |
Upgrades distro | apt full-upgrade |
Search for a package | apt search [package name] |
Show info for a package | apt show [package name] |
Install package | apt install [package name] |
Install .deb file | dpkg -i ./[packagename].deb (without dependencies) apt install ./[packagename].deb (for dependencies) |
Remove package | apt remove [package name] |
Cleans dependencies from deleted packages | apt autoremove |
Purge dependencies from package | apt purge [package name] |
DNF
DNF comes with all Red Hat-based distros including RHEL, CentOS, and Fedora. This package manager is more secure than others, but it comes with a tradeoff of being slower. YUM was the predecessor and is now in a semi-deprecated state. It still works but usage is discouraged.
Update Repo | dnf upgrade |
Upgrade/Update packages | dnf upgrade |
Search for a package | dnf search [keyword] |
Show info for a package | dnf info [package name] |
Install package | dnf install [package name] |
Install .rpm file | dnf install ./[packagename].rpm |
Remove package | dnf remove [package name] |
Cleans dependencies from deleted packages | dnf autoremove |
The process for upgrading your distro using DNF is a bit complicated, so I'll just link it here.
A nice feature that sets DNF apart is that it allows you to select a collection of packages at a time. This is very helpful when searching and installing a collection of astronomy software, a desktop environment, office software, and more.
List all collections | dnf group list |
Install a collection | dnf group install [PackageGroupName] |
Remove a collection | dnf group remove [PackageGroupName] |
Another feature of DNF is the ability to use delta updates. Delta updates to packages mean that only the code that has changed within the package needs to be downloaded and updates, thus reducing the amount of data downloaded for metered connections and it reduces the load on servers.
pacman
Arch-based distros come with their own package manager called pacman. This one isn't as verbose as the other package managers and lettercase matters. Don't mistake a -s with a -S.
Another feature of Arch-based distros is the ability to use the AUR (Arch User Repository). Some distros may have AUR defaulted off because these are community-built packages; hence, proceed with caution. An article from It's FOSS shows how to enable it. There are numerous packages available that may not be found with other package managers. Using AUR is a simple process with many steps. Luckily, this online article from Average Linux User shows how easy it is to use.
Update packages | pacman -Syu |
Search for a package | pacman -F [package name] |
Show info for a package | pacman -Si [package name] |
Install package | pacman -S [package name] |
Install .pkg.tar.zst file | pacman -U ./[packagename].pkg.tar.zst |
Remove package | pacman -R [package name] |
Cleans dependencies from deleted packages | pacman -Rs |
eopkg
Solus is the only known distro that offers this package manager. It's not too different than either APT or DNF. It is the fastest package manager I have experienced. Delta packages are supported which makes it even faster than others. There are currently plans to replace eopkg with sol on Solus.
Upgrade packages | eopkg upgrade |
Search for a package | eopkg search [keyword] |
Show info for a package | eopkg info [package name] |
Install package | eopkg install [package name] |
Remove package | eopkg remove [package name] |
Zypper
openSUSE uses the Zypper package manager. It too is fairly straightforward in its usage.
Upgrade Packages | zypper update |
Patch | zypper patch |
Upgrade Operating System | zypper dist-upgrade |
Search for a package | zypper search [keyword] |
Show info about package | zypper info [package name] |
Install package | zypper install [package name] |
Install .rpm file | zypper install ./packagename.rpm |
Remove package | zypper remove [package name] |
Linux Containerized Package Managers
There has been a movement in the Linux community to have an easy to use distro-agnostic solution for package managers. One which users could use easily while developers would have an easy option of being able to deploy their programs and have them work consistently, no matter which distro they choose.
A few developers choose not having their programs available in repositories because of the work involved maintaining them. They would have their programs available as source code for you to build it yourself. In many cases, developers would not highlight which packages are needed by the program to work, different distros would have different versions of the same needed package, and would often fail. These failures would force people to futilely hunt down all of the dependencies on their own, resulting in dependency hell. This is one of the reasons why containerized, portable package managers were created.
Snap
Created by Canonical, the parent company behind Ubuntu, it aims as a simple solution to the problem at hand. It comes with an easy to search store called Snapcraft. It's also integrated into the software store on Ubuntu. Snap is available on many different distros, making it easier to target for developers. Snaps also automatically update themselves, thus making it easy on the consumer to know they are protected.
Many people complain about the large download sizes needed for even just a simple program. Depending on the number of dependencies, a program could only be just several mebibytes in a repository while being over 200MiB using Snap because all of the dependencies are being fulfilled in that instance. Because snaps are containerized, snaps don't use themes found on the system. This can lead to a jarring look that doesn't sit well with certain people's feng shui.
There has been much controversy surrounding Snap. For one, it is a commercialized solution that nobody can audit the code necessary to patch a program. Some distros have even blocked the ability to install Snap on their operating system, notably Linux Mint.
If your system doesn't already have Snap preinstalled, just
Install Snapd on your system | [your package manager (apt, dnf)] install snapd |
Search for a Snap | snap find [keyword] |
Show info about a Snap | snap info [app name] |
List all installed Snaps | snap list |
Install app | snap install [app name] |
Remove app | snap remove [app name] |
AppImage
Very simple to use, practical, and comparable to Windows' .msi or .exe files. Just make sure the .appimage file is executable (either by right-clicking on the file, go to properties, permissions tab, and check make file executable xor you can type chmod a+x [filename].appimage within Terminal) and execute the file.
This is my favorite containerized package manager. It's also Linus Tovalds' favorite way of distributing files. A hub containing a list of AppImage software is available here. No command line entries are needed to manage these apps.
There's no best way to keep an AppImage up to date. Right now the easiest solution is just to redownload a current version of the file. They are working on that though, but nothing is ever guaranteed.
Flatpak
Flatpak is GNOME's solution to containerized apps. It is integrated into the Software Store on the GNOME desktop. It takes a little setup to get Flatpaks working on your system if it doesn't come already setup. After you get it all setup, you can now browse for apps and install them right from Flathub.
I haven't had much luck with Flatpak in my experience. Even though it downloads a gibibyte to start with and I follow all of the instructions, it still complains that I need Flatpak installed. When I do finally figure out how to get Flatpak installed, sometimes all Flatpaks will get corrupted at the same time (usually fonts). Even if I borked it, installation should be simple enough to prevent people from borking up their installs.
Windows Package Manager
winget
Windows' very own package manager is currently being tested and not available out of the box. However, you can test drive it by using the flight or preview version of Windows App Installer. To do that, you must submit a request to the Windows Package Manager Insiders Program using your Microsoft account. Then you must install the Windows Desktop App Installer package from GitHub. If you didn't get all that, Windows Central published a helpful guide to get started. Winget essentially is the CLI version of the Microsoft Store.
Currently (these things change), it's pretty limited. If you need help on how to do the things it can do, type winget --help.
Search for a package | winget search [appname] |
Info about a package | winget show [appname] |
Install package | winget install [appname] |
Remove package | Feature coming soon |
When choosing a Linux distro, keep in mind which package manager it uses and if that really is a factor in your decision. Most package managers are fairly equivalent in their usage. After all, their job is to install, manage, and delete packages.