Package manager facts for kids

A package manager is a special set of computer programs. It helps you easily install, update, set up, and remove other programs on your computer. Think of it like a smart assistant for your software!
These managers work with "packages." A package is like a digital box containing a program and all its important details. These details include the program's name, what it does, its version number, and a list of other programs it needs to work. This list is called "dependencies."
When you install a package, the manager saves its details in a local database. This helps prevent problems where programs don't work because they're missing something. Package managers often work with online "software stores" or "repositories" where programs are kept. They make it much simpler to manage many programs at once.
Contents
How Package Managers Started
One of the first package managers was called SMIT. IBM introduced it in 1989 for their AIX computer systems.
Around 1994, early package managers made it easier to add or remove software. But they didn't automatically figure out if a program needed other programs to run.
By 1995, new package managers like CPAN started to change things. They could download programs from online stores. They also automatically found and installed any other programs needed. This made installing, uninstalling, and updating software much simpler for everyone.
What Package Managers Do
A software package is like a digital container. It holds a computer program and all the information needed to put it on your computer. Sometimes, the program is in "source code." This means it needs to be built into a working program first. The package also includes details like its name, version, and what other packages it needs.
Package managers have several important jobs:
- They work with file tools to open and unpack software packages.
- They check if a package is real and hasn't been changed. They do this by looking at special codes called "checksums" and "digital certificates."
- They find, download, install, or update programs from online software stores.
- They can group programs by what they do. This helps users find what they need more easily.
- They manage "dependencies." This means they make sure all needed programs are installed together. This helps avoid problems where programs don't work.
Solving Software Problems
Some computer systems share parts of programs called "libraries." If different programs need different versions of the same library, it can cause problems. This is sometimes called "dependency hell" or "DLL hell" on Windows computers.
Modern package managers have mostly fixed these issues. They can install different versions of the same library at the same time. This lets programs use the exact version they need.
Keeping Programs Updated
When you update software, it can sometimes be tricky with settings files. Package managers usually just replace or keep these files. This can cause issues if the new version needs different settings.
Some package managers, like Debian's dpkg, let you set up programs during installation. This is helpful for installing programs on many computers at once.
Software Stores (Repositories)
Software is often downloaded from different online "software repositories." These are like big online libraries of programs. This gives users more control over what software they install. It also helps with legal or convenience reasons for software makers.
Stopping Updates
When you update your software, package managers usually show you a list of what will change. You can choose to update everything or pick specific programs. Many managers let you stop certain programs from updating. Or they can update them only if there are serious security problems. This is sometimes called "version pinning."
For example, you can tell `yum` to `exclude=openoffice*` to stop updating OpenOffice. Other managers like `pacman`, `apt`, and `portage` have similar ways to do this.
Removing Programs Completely
Some advanced package managers can do "cascading package removal." This means when you remove a program, they also remove any other programs that only depended on that one. This helps keep your computer clean.
Common Commands
Even though each package manager has its own commands, they often do similar things. Here's a quick look at some common actions:
Action | zypper | pacman | apt | dnf (yum) | swupd | portage | Nix | Homebrew | WinGet | xbps |
---|---|---|---|---|---|---|---|---|---|---|
Install program |
|
|
|
|
|
|
|
|
|
|
Remove program |
|
|
|
|
|
or
|
|
( is shorthand for or ) |
|
|
Remove program (and unneeded parts) |
|
|
|
|
swupd bundle-remove ${PKG} && \
swupd bundle-remove --orphans |
or
|
|
brew rm ${PKG} && \
brew autoremove |
|
|
Update software list |
|
|
|
|
or
|
|
|
|
|
|
Show programs to update |
|
|
|
|
or
|
or
( is shorthand for and is shorthand for .) |
nix-channel --upgrade && \
nix-env -u && \
nix-collect-garbage |
|
|
(requires void-packages repository) |
Delete unneeded parts and settings |
|
|
|
|
swupd bundle-remove --orphans && \
swupd clean --all |
|
|
|
N/A |
|
Show unneeded parts |
|
|
N/A |
( is shorthand for .) |
|
or
|
N/A | N/A | N/A |
|
Update all programs |
|
|
|
|
|
|
|
|
|
|
You can find more details on the Arch Linux Pacman/Rosetta wiki.
Where Package Managers Are Used
Package managers like dpkg have been around since 1994.
Many Linux distributions (types of Linux operating systems) rely heavily on package managers. They are the main way to get and maintain software on these systems. Mobile operating systems like Android and iOS also use their own special package managers. These are often built into their app stores.
Package Managers vs. Installers
People sometimes confuse package managers with "installers." An installer is usually a single program that puts one piece of software on your computer. A package manager is much more powerful. It can handle many programs at once. It also manages updates and removes programs cleanly.
Criterion | Package manager | Installer |
---|---|---|
Shipped with | Usually, the operating system | Each computer program |
Location of installation information | One central installation database | It is entirely at the discretion of the installer. It could be a file within the app's folder, or among the operating system's files and folders. At best, they may register themselves with an uninstallers list without exposing installation information. |
Scope of maintenance | Potentially all packages on the system | Only the product with which it was bundled |
Developed by | One package manager vendor | Multiple installer vendors |
Package format | A handful of well-known formats | There could be as many formats as the number of apps |
Package format compatibility | Can be consumed as long as the package manager supports it. Either newer versions of the package manager keep supporting it or the user does not upgrade the package manager. | The installer is always compatible with its archive format, if it uses any. However, installers, like all computer programs, may be affected by software rot. |
Package Managers vs. App Stores
App stores (like Apple's App Store or Google Play) are also a type of package manager. But they are usually simpler. App stores are often designed to sell software. They might only offer single programs without managing their dependencies. They focus on being easy to use rather than having many advanced features. This is common on commercial operating systems and locked-down devices like smartphones.
Types of Package Managers and Formats
Each package manager works with specific "package formats." These are how programs are bundled together with their details. For example, `yum` uses the `rpm` format. `Synaptic Package Manager` uses the `apt` library, which relies on `dpkg`.
Alien is a program that can change packages from one Linux format to another. This helps programs work on different Linux systems.
For mobile phones, Google Play uses the Android application package (APK) format. The Microsoft Store uses APPX and XAP formats. Both Google Play and Microsoft Store have their own package managers.
Free and Open Source Software
Many package managers are used with free and open source software. This means the software can be freely used, changed, and shared. These systems can combine many different programs. They handle all the different versions and conflicts.
A key difference is that free and open source systems let you install and update programs from many different sources. Package managers on systems like Mac OS X and Windows usually only update software from Apple or Microsoft. You can often add other software sources to free and open source package managers.
Special Package Managers for Programs
Besides the main package managers for your computer's operating system, there are also special ones. These are for specific programming languages or for systems with limited features.
These special managers usually keep their programs in a separate place on your computer. This helps avoid conflicts with the main system's package manager.
Impact of Package Managers
Ian Murdock, a famous computer scientist, said that package management is "the single biggest advancement Linux has brought to the industry." He believed it made it easier to create new software and improve operating systems.
There's even a conference called PackagingCon for people who develop package managers. It started in 2021 to share ideas about how package management works.
See also
In Spanish: Sistema de gestión de paquetes para niños
- Dependency hell
- Installation (computer programs)
- List of software package management systems
- Manifest file
- Package format
Images for kids
-
apt-get
, a command-line tool installing MediaWiki -
Apper, a graphical tool for PackageKit
-
winget
, the Windows Package Manager command-line tool for Windows 10