Friday, April 17, 2026
Linux

Complete APT Package Management Guide for Ubuntu 26.04

Complete APT Package Management Guide for Ubuntu 26.04
108views

Introduction

APT — the Advanced Package Tool — is the foundation of software management on Ubuntu and every Debian-based Linux distribution. Whether you are installing your first application, updating a production server’s packages, troubleshooting a broken dependency, or managing a fleet of machines through automation scripts, APT is the tool you reach for. Understanding APT deeply is not optional for anyone administering Ubuntu systems — it is as fundamental as understanding the filesystem.

Ubuntu 26.04 LTS (Resolute Raccoon) ships with APT 3.1.16, a version that brings several meaningful improvements over the APT versions found in previous Ubuntu releases. The default dependency resolver has been replaced with solver3, a ground-up rewrite using a SAT-solver-inspired approach that is faster and more predictable. Two new diagnostic subcommands — apt why and apt why-not — finally give administrators visibility into APT’s dependency decisions. The DEB822 .sources format replaces the legacy one-line sources.list format as the standard for repository configuration. Repository-level package filtering through Include and Exclude fields enables fine-grained control over which packages are available from each repository. And the apt modernize-sources command provides an automated migration path from legacy .list files to the modern .sources format.

Installing Packages

Install a single package

Install multiple packages in one operation

Install a specific version of a package

Install a local .deb file (APT resolves dependencies automatically)

Install without interactive confirmation prompts (for scripts)

Reinstall a package (useful when files are corrupted)

Removing Packages

Remove a package (keeps configuration files)

Remove a package AND its configuration files (complete removal)

Remove unused dependencies that were auto-installed with other packages

Combine purge and autoremove in one operation

apt remove leaves configuration files intact in /etc/ — useful if you plan to reinstall the package later and want to keep your settings. apt purge removes configuration files as well, returning the system to a completely clean state for that package. For most removals, purge is the more thorough and recommended choice.

Listing Installed Packages

List all installed packages

Filter installed packages by name

Count total installed packages

Check if a specific package is installed

Show all files installed by a package

Checking Dependencies

Show a package’s dependencies

Show what packages depend on this package (reverse dependencies)

Simulate an installation (shows what would happen without doing it)

Or equivalently:

New in APT 3.1.16: solver3, apt why, and apt why-not

solver3: The New Default Dependency Resolver

Ubuntu 26.04 enables solver3 as the default dependency resolver for all apt operations. Solver3 is a complete rewrite of APT’s dependency resolution logic, replacing the classic solver that had been in use since APT’s early days. The new solver uses a DPLL (Davis–Putnam–Logemann–Loveland) algorithm with unit propagation a SAT-solver-inspired approach that evaluates dependency graphs more systematically.

In practical terms, solver3 delivers three main improvements over the classic solver. It is approximately 40% faster because it does not evaluate every package in the repository when computing a solution — it only evaluates packages relevant to the current operation. It produces more predictable results, particularly in complex dependency conflict scenarios where the classic solver’s behavior could be surprising. And it handles the ordering of alternatives in dependency groups (Depends: pkgA | pkgB) more consistently, always respecting the left-to-right preference order documented in Debian policy.

Conclusion

APT on Ubuntu 26.04 is meaningfully more capable than the APT versions found in previous Ubuntu releases. The solver3 upgrade makes dependency resolution faster and more reliable. The apt why and apt why-not commands bring long-needed diagnostic transparency to operations that were previously opaque. The DEB822 format modernizes repository configuration. The Include/Exclude filtering simplifies third-party repository management. And apt history gives administrators a native rollback capability for the first time.

Leave a Response