How to search for installable packages on Debian

The thing that I miss most of all since moving from Arch Linux back over to
Debian is the Arch User Repository (AUR). Every package I ever needed was there,
sometimes multiple times based on different forks that folks were maintaining.

Even without the AUR, Debian has a massive number of packages available,
arguably more than Arch just due to the aforementioned duplicates in packages.

But enough of the flame bait, let’s talk about searching for installable
packages, based on which source repositories you already have configured.

It’s good practice to run apt update first, to make sure you have the local
cache primed, and up to date.

To search for packages, we’re going to use the apt-cache command. The cache
we’re talking about is the local cache of available packages that gets loaded
when you run apt update.

Let’s say you want to find all of the GNOME Shell extensions that are readily
available, simply run:

apt-cache search gnome-shell-extension

And all of the packages that mention that string will be listed out.

YMMV, but you may have noticed that there were some packages listed that don’t
appear to contain the string gnome-shell-extension. The reason for this is
that by default, the apt-cache search looks at both the name of the package as
well as the description.

To further hone things down to just the package names, you’ll want to include
the --names-only argument as well:

apt-cache search --names-onle gnome-shell-extension

Once you find the package you’re looking for, go ahead and apt install and be
on your way!

Josh Sherman - The Man, The Myth, The Avatar

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Head of Engineering and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.


If you found this article helpful, please consider buying me a coffee.