Package manager – think of it like a developer-centric version of an app store. App stores are for consumers, but package managers are useful for developers and power users. A package manager will help you manage packages – you can install, update, upgrade, or remove them. You can also search for packages from a list of available ones. A package can be a standalone program or even a library dependency you need for a different program or project. Typically, if a program that you want to install from a package manager requires a dependency, it will check to see if you have it installed, and if not, then the package manager will have you install the dependencies for the program too. It’s a handy way to install software from the command line, but really only on macOS, Linux, and BSD. Windows doesn’t have a good package management solution, so you usually go with web-based installers.
Package managers are usually text-based.
Package managers use things called package repository lists, which are lists of things you can install.
Apps in an app store might cost money, but typically, all packages in a package manager will be free. No microtransactions or ads either.
homebrew – macOS unfortunately doesn’t come with a package manager by default, but you can install one called homebrew. After you install it, you can use it with the brew command in a terminal. Some useful brew commands include brew update followed by brew upgrade. That will update the package manager and the packages you have installed within it.
These commands can take a while to complete, so I like to do this in a single command:
brew update; brew upgrade
You can run multiple commands using ; or &&. && means the subsequent command will only run if the first command had no errors, and ; means it will just run them no matter what. They are run one after the other.
The advantage of having those two commands run like that as opposed to being run on separate lines is the unattended time it takes to complete. By unattended time, I mean the computer takes a while to finish it, but it doesn’t require you to do anything, so you can theoretically leave the computer to do something else while it finishes the command.
Chocolatey (choco) – a package manager for Windows. I don’t use it and I’ve heard some people mention issues with having to trust repo maintainers, and how that can be a potential security concern. I don’t know if that’s a real issue or not, but I still don’t use it.
Ninite Updater – a Windows tool for installing software updates without a package manager. Only works with very popular software.
apt – a package manager for Debian-based GNU/Linux distributions, such as Debian, Mint, Kali, and Ubuntu.
apt-get install whatever– On a Debian-based Linux distro, install a package called whatever.
apt-get remove whatever– On a Debian-based Linux distro, uninstall a program
apt-get update and apt-get upgrade– use these two commands, one after the other, to update the software on your system. These, along with many other commands, will require elevated privileges.
sudo apt-cache search whatever – search your package manager’s repositories to see if there is anything called whatever.
pacman – package manager for Arch Linux.
portage – a package manager for Gentoo Linux.
yast – a package manager for OpenSuSE.
yum and rpm – package managers for RedHat, CentOS, and Fedora.
npm – a package manager for the Node server platform.
helm – a package manager for Kubernetes.
pip and pypy – package managers for python.
pip install and pip3 install – how to install Python packages using the PyPi package manager. The confusing thing here is that pip sometimes refers to pip2, and sometimes refers to pip3.
RubyGems (gem) – a package manager for Ruby.
pkg – the package manager for Termux.
Windows Server “roles” – not exactly a package manager, but a way to quickly install or uninstall components on a machine running the Windows Server operating system. It’s not the same as Unix-like OS ones, but close enough that I will mention it here.
Flatpak and Snap – ways of packaging up an application for Linux, making it more portable. These aren’t package managers, but I figured these concepts should be in this section because they relate to packages and Linux.