Master command-line package managers to install, update and remove software reliably on Linux. 15.11.2025 | reading time: 2 min Package managers are the fastest, safest path to install, update and remove software on Linux; learn to operate them from the shell and you control versions and dependencies. A quick, practical example Follow these steps to update caches, install a tool and verify installation; run: ```bash sudo apt update sudo apt install -y htop dpkg -s htop | grep Version ``` A realistic excerpt of output looks like: ```text Get:1 http://archive.ubuntu.com/ubuntu focal InRelease Reading package lists... Done Building dependency tree... The following NEW packages will be installed: htop 0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded. Setting up htop (2.2.0-1ubuntu1) ... Version: 2.2.0-1ubuntu1 ``` Then start the program with `htop` and inspect the process list. Repository hygiene and options Add or trust repositories before installing, prefer signed repositories and check signatures; use non-interactive flags like `-y` for scripts, pin or hold packages to avoid unwanted upgrades, and run full upgrades periodically to reconcile dependencies and security fixes. When the basics are not enough Use `apt-cache policy` or `dnf info` to inspect candidate versions, resolve conflicts with explicit version installs, rebuild package caches when corrupted, and resort to `dpkg --configure -a` or `rpm --rebuilddb` only when package metadata is broken. Other ecosystems to know Distributions offer native tools and newer universal formats; learn `apt`/`dpkg` on Debian-based systems, `dnf` (and legacy `yum`) on Fedora/RHEL, `pacman` on Arch, and consider `snap` or `flatpak` for sandboxed desktop apps. Finish line and next steps Practice installing, upgrading and removing packages in a VM to build muscle memory; then expand into repository maintenance and automation, and consider formalising skills with certifications like CompTIA Linux+ or LPIC-1 — bitsandbytes.academy offers intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. setup utilities infrastructure troubleshooting