Ubuntu apt

Managing Software - Searching With apt

- September 01, 2020

Managing Software - Searching With apt

Searching for software to install is easy with apt. We’ll see how to do it in this article.

Searching apt

Searching for software you may want to install is easy with apt, with one caveat. Packages aren’t always named intuitively. The two commands you’ll use most are apt search and apt show.

apt search

We’ll cover two examples with apt search, and the next option, apt show. We’ll also see how to look at what dependencies are required or recommended with apt depends.

We’ll look into whether we want to install nmap, an awesome network scanning tool, and OpenLDAP, a Lightweight Directory Access Protocol (LDAP) user and resource database for Linux.

 If you’ve heard of Active Directory for Windows, this provides similar functionality for Linux. You can have windows clients connect to an OpenLDAP server too.


Running apt search nmap returns a lot of results, but scrolling down through the alphabetically organized list to “n”, we see the following:

 nmap/xenial 7.01-2ubuntu2 amd64

 The Network Mapper

Now, we know nmap is there, and it’s actually called nmap for the package we’ll want. We can make sure this is what we’re after with apt show.

apt show nmap


 Package: nmap


Description: The Network Mapper Nmap is a utility for network exploration or security auditing…

This is a cool tool for you to get to know.


 Now, we’ll search for the requirements for installing OpenLDAP Server.

 apt search openldap

Scrolling down through the output, we don’t see an entry for OpenLDAP. It jumps from lua-ldap to python-dgango-python3-ldap. There’s no entry starting with “o”.

Scrolling back up though, we can find an entry called ldap-utilities that looks promising. Let’s have a closer look at that one.

 Apt show ldap-utils


Package: ldap-utils


Description: OpenLDAP utilities This package provides utilities from the OpenLDAP (Lightweight Directory Access Protocol) package. These utilities can access a local or remote LDAP server and contain all the client programs required to access LDAP servers.

This looks promising.

If I wanted to install OpenLDAP server, I’d head down that path, and usually back it up with some Googling.

Checking Dependencies

Sometimes, you may want to see what additional software may be required to have the application you’re interested in install and run properly. These other programs are called Dependencies.

 You can have a quick look at what dependencies there are with the apt depends option.

apt depends ldap-utils

Tells you the following:

Depends: libc6 (>= 2.14)

 Depends: libldap-2.4-2 (= 2.4.42+dfsg-2ubuntu3.2)

 Depends: libsasl2-2

 Conflicts: <ldap-client>

 Conflicts: <openldap-utils>

 Conflicts: <umich-ldap-utils>

 Recommends: libsasl2-modules

 |Suggests: libsasl2-modules-gssapi-mit

 Suggests: libsasl2-modules-gssapi-heimdal

 Replaces: <openldap-utils>


 Replaces: <openldapd>

 Replaces: slapd (<< 2.2.23-0.pre6)

Usually, the dependencies are automatically installed for you when you install a package, but it’s good to know where to find out the requirements for a package when troubleshooting a conflict.