Install/Uninstall Applications in Ubuntu using apt-get

Ubuntu comes with the apt-get command which is all you will need to Install/Uninstall/Upgrade your system. In fact it is available in all the Debian based distributions. This is quite similar to the yum command in Fedora and brew available in MAC.

Install an Application

Run the following command, replacing the [] with the name of the application.

sudo apt-get install [app-name]

Download a Package without Installation

Can package or application can only be downloaded:

sudo apt-get download [app-name]

Uninstall an Application

Run the following command, replacing the [] with the name of the application.

sudo apt-get remove [app-name]

Completely Uninstall an Application along with the Dependencies

Run the following command, replacing the [] with the name of the application.

sudo apt-get remove [app-name]
sudo apt-get autoremove

To Update and Synchronize the List of Applications from Remote Server

This will resynchronize all the package sources mentioned in the /etc/apt/sources.lst file.

sudo apt-get update

To Upgrade all the Applications to the Latest Version

It is highly recommended that first the update command is executed.

sudo apt-get upgrade

Searching for Packages

Before installation, a package can be searched using regular expressions. The information displayed is the one which was fetched last time when update was run.

sudo apt-cache search vim*

Displaying Details for Packages

The details of any package can be displayed using the command:

sudo apt-cache show [app-name]

Delete Downloaded Packages to Clean Disk

The packages downloaded to the local repository can be deleted to save disk space:

sudo apt-get clean
Advertisements

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