apt search in Ubuntu

In this article, we would cover how to search for packages in Ubuntu using apt command-line utility. There are numerous GUI package managers which help us manage packages in Ubuntu. And, mostly they work just fine. But, we can also achieve similar outcomes through apt. apt in Ubuntu’s Advanced Packaging Tool, which most of us use to install, remove and upgrade packages.

But, there is more to it. We can extract tons of information about a package through apt. One aspect which we discuss here is the search function of apt.

We do not require superuser privileges to perform search through apt. But, if we choose to install, remove and upgrade the packages then that won’t work without superuser privileges.

apt search in Ubuntu

Handling packages with GUI package managers is pretty easy. All we need to do is search for a specific package and take a required action. Similar outcome can also be achieved through apt. So, we first do the package search and later get detailed information about the package.

Use following syntax to search for a package through apt –

apt search <package-name>

This will not only return with the package we are looking for but also other numerous packages which may contain the keyword specific to the package. For instance,

apt search firefox

It would come up with all packages which may contain firefox as keyword either in their name or description. We can zero-in the package we are looking for with the help of less command.

apt search firefox | less

It becomes easier for us to get more information related to the identified package through the following –

apt show <package-name>

It would show us a list of dependencies, source repository, installed size, download size, description etc.

For instance, if we want to get more information about the package firefox-locale-xh then –

apt show firefox-locale-xh

In conclusion, we have covered apt search command in Ubuntu here. The tools which we have discussed are pretty useful if we want more information about a package. apt search helps us locate the package. On the other hand, apt show would provide us the detailed information about the package.