Premium lesson

Managing Software Packages on Linux

Shell·3 min read·Jan 1, 2025

The Advanced Package Tool (APT) is a free collection of pre-installed tools that simplify the process of installing, upgrading, configuring, and removing software packages on Linux distributions.

APT relies on package repositories, which are collections of software packages maintained by the distribution's community or organization, located on remote servers.

Searching for packages

To search for a software package on the APT registries that partially matches a specified keyword, you can use the apt search command:

$ apt search term

Where term is a regular expression such as tree or tree$.

On the other hand, to perform an exact search, you can use the following syntax:

$ apt search '^term$'

Which in regex translates to: "the package name starts and ends with the specified term".

Upon execution, the apt command will perform a linear, lexically-ordered search through the available packages in APT repositories and output the name and short description of each package matching the specified regex.

Example

This command will output all the packages containing the term tree in their name:

$ apt search treeSorting... DoneFull Text Search... Donetre-command/jammy 0.3.6-2 amd64  Tree command, improved
icon light bulb key

Unlock the CLI & Scripting with Bash module

Learn how to gain advanced control over the OS and automate complex routine tasks prone to manual errors with the CLI and Bash scripting.

You get immediate access to:

  • 34 focused lessons across the CLI and Bash
  • 4 real-world projects with commented solutions
  • Ongoing updates to this bundle
  • Lifetime access to this bundle
Unlock this module