Apt-Get Search, Install and Remove packages

Apt-Get is a powerful repository management tool available in Ubuntu. It allows you to install common packages immediately, removing the need to manually compile from source.

Search Packages in Apt-Get

Searching available packages in Apt-Get is easy, simply issue the following to search all packages named ‘nmap’:

apt-cache search nmap

Additionally, you can organise your output by suffixing the following flags:

–names-only (display package names only, not names and descriptions)
–installed (display installed packages only, not installed and available)

Installing Packages using Apt-Get

Searching was easy, so is installing. Here’s an example of using Apt-Get to install nmap:

apt-get install nmap

Worried about dependencies? You can resolve them directly using the following command instead:

apt-get build-dep nmap

Removing / Uninstalling Packages in Apt-Get

Need to remove an installed package using Apt-Get? Issue the following command to remove nmap using Apt-Get:

apt-get remove nmap

If you want to remove the configuration files in addition to removing the package, you can embed the ‘purge’ flag:

apt-get remove nmap --purge
Advertisements

Author: drewsymo

Developer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s