Home / Packages

Package management

Install, update and remove software safely.

Laptop showing package management commands next to Agenda VR3.
TaskDebian/UbuntuFedoraArch
Refresh and upgradesudo apt update && sudo apt upgradesudo dnf upgradesudo pacman -Syu
Installsudo apt install namesudo dnf install namesudo pacman -S name
Removesudo apt remove namesudo dnf remove namesudo pacman -R name
Searchapt search worddnf search wordpacman -Ss word

Repositories first

Install software from your distribution’s repositories whenever possible: packages are tested, signed and updated automatically. Universal formats such as Flatpak are useful for desktop apps that are not packaged by your distribution.

Dependencies, optional packages and clean removal

Packages are more than archives of files. Each one declares metadata: name, version, architecture, dependencies, conflicts and sometimes suggested extras. When you install a web browser, the package manager may also pull in libraries, fonts or certificate bundles. That is normal. What matters is reading the transaction summary before you confirm it.

If an install wants to remove a large set of unrelated packages, stop and check why. A typo in the package name, an old third-party repository or a partial upgrade can all produce bad dependency decisions. This is a good habit on any distributions, especially when working from the command line.

Not every extra package is required. Debian-family packages often distinguish between Depends and Recommends. Fedora and Arch may list optional packages separately. Optional components can add shell completion, image format support, printing back ends or developer headers without being essential to the main program.

Removal also differs. apt remove keeps system-wide configuration files so you can reinstall later, while apt purge removes those files as well. Fedora and Arch remove package files, but you may still see saved config copies such as .rpmnew, .rpmsave or .pacsave after upgrades or removals. Review them instead of deleting them blindly.

After uninstalling software, clean up packages that were installed only as dependencies: apt autoremove, dnf autoremove, or pacman -Qdt to list orphans before removing selected ones with pacman -Rns.

Inspect packages and trace files back to their owner

Searching by a vague word is only the first step. Before installing, inspect what the package actually is: apt show name, dnf info name, pacman -Si name. These commands show the version, description, repository and dependency information, which helps when several packages have similar names.

You can also see what a package installs. Use dpkg -L name, rpm -ql name or pacman -Ql name to list files. That is useful for finding documentation, service units, example configuration and binaries after installation.

When troubleshooting, it is often more useful to work backwards from a file or command. If you find /usr/bin/convert or /etc/ssh/sshd_config, ask which package owns it: dpkg -S /path/to/file, rpm -qf /path/to/file, pacman -Qo /path/to/file. That quickly tells you whether the file came from a package or was added manually. It is especially handy during troubleshooting and when checking what a script relies on.

If the program is not installed yet, package-content searches work differently by distribution. Fedora can search available packages with dnf provides '/usr/bin/name'. Arch can do the same with pacman -F name after refreshing the file database with pacman -Fy. On Debian and Ubuntu, the apt-file utility provides similar searches once installed and updated.

These inspection tools also help when package names vary between systems. Development headers might appear as -dev on Debian-based systems and -devel on Fedora. Library packages may include ABI version numbers. Looking at the metadata first saves guesswork.

Third-party repositories, Flatpak and update discipline

Your distribution’s own repositories should remain the baseline. Extra repositories are sometimes necessary, but each one adds another source of packages, signing keys and version choices. The main risk is not only malicious software; it is compatibility. A third-party repository can replace core libraries with builds your system was not tested against, or it can lag behind and block normal upgrades.

Before adding one, check three things:

  • it matches your distribution release
  • it matches your architecture
  • you can explain exactly which package you need from it

Repository configuration is usually stored in plain text under /etc/apt/sources.list and /etc/apt/sources.list.d/ on Debian and Ubuntu, /etc/yum.repos.d/ on Fedora, and /etc/pacman.conf on Arch. If you later remove the repository, review any packages you installed from it as well; they do not automatically switch back to the official source.

A single local package file can be convenient, but prefer tools that still resolve dependencies properly: apt install ./package.deb, dnf install ./package.rpm and pacman -U file.pkg.tar.zst. If that package came from outside your normal repositories, treat it as an exception and keep a note of it.

Universal formats such as Flatpak are useful when a desktop application is missing or badly out of date in the main repositories. The trade-off is a second packaging system to maintain. Updates, runtime libraries and sandbox permissions are managed separately from apt, dnf or pacman, so it is worth checking them periodically. For command-line tools, drivers and low-level system components, native packages are usually the safer choice.

Whatever format you use, update regularly and read the summary before confirming. Kernel, graphics stack and library updates can require a reboot or at least restarting applications. If something looks wrong, pause and verify it rather than forcing the transaction; that caution is part of basic security.