Using the Aptitude Package Manager

To use the aptitude package manager via Ubuntu Server/Desktop Terminal:

Simply type the following and press enter, to view an interactive list of available packages using the Arrow Keys and Tab key to navigate:

aptitude

To update installed packages:

sudo apt-get update

To upgrade OS version if available:

sudo apt-get upgrade

To search for a package:

sudo apt-get search Search-Term

To install a package:

sudo apt-get install Package-Name

One switch I use a lot when troubleshooting commands in Ubuntu is:

sudo apt-get remove --purge Package-Name

Including the purge switch/flag makes it remove all of the remnants of the package it can, making it easier to start with a clean slate.