# APT Packages

### apt-cache search and apt show

The <span class="pr-block">apt-cache search</span> command displays much of the information stored in the internal cached package database. For example, let's say we would like to install the *pure-ftpd* application via APT. The first thing we have to do is to find out whether or not the application is present in the Kali Linux repositories. To do so, we would proceed by passing the search term on the command line:

[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-08/scaled-1680-/cuiimage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-08/cuiimage.png)

To confirm that the resource-agents package description really contains the "pure-ftpd" keyword, pass the package name to <span class="pr-block">apt show</span> as follows:

[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-08/scaled-1680-/zFFimage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-08/zFFimage.png)

### apt remove --purge

The <span class="pr-block">apt remove --purge</span> command completely removes packages from Kali. It is important to note that removing a package with <span class="pr-block">apt remove</span> removes all package data, but leaves usually small (modified) user configuration files behind, in case the removal was accidental. Adding the <span class="pr-block">--purge</span> option removes all the leftovers.

### dpkg

*dpkg* is the core tool used to install a package, either directly or indirectly through APT. It is also the preferred tool to use when operating offline, since it does not require an Internet connection. Note that <span class="pr-block">dpkg</span> will not install any dependencies that the package might require. To install a package with <span class="pr-block">dpkg</span>, provide the <span class="pr-block">-i</span> or <span class="pr-block">--install</span> option and the path to the <span class="fp-block">.deb</span> package file. This assumes that the <span class="fp-block">.deb</span> file of the package to install has been previously downloaded or obtained in some other way.

[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-08/scaled-1680-/WV4image.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-08/WV4image.png)