Arduino (1) Bugs (3) C (1) Install (3) Linux (25) Maths (1) Python (11) Raspberry Pi (4)

Saturday, 20 June 2015

How to use apt-get on debian or ubuntu systems.

The advance package tool also known as APT is a tool that is used for the easy installation, removal and upgrading of software on Debian/Ubuntu systems.

Things that I will show you how to do:
  1. Search for packages using apt-get
  2. Update system package lists
  3. Upgrade software packages
  4. Install and remove specific software packages
  5. Check for broken dependencies

1. Search for packets that you would like to install using apt-get.
This command can be used to search for packets and find the specific name so that it can be installed. It also gives a short description on what each piece of software is.
apt-cache search
apt-cache search google-chrome  

2. Update system package lists.
This command downloads the package lists from the repositories to get info on the new packages available. 
sudo apt-get update

The "sudo" command is needed as you need to be root to update the packages as protected files are accessed.

3. Upgrade software files.
This searches for any updated software that is currently installed on your computer.
sudo apt-get upgrade 

"sudo apt-get update"
This command should be run before running this command to get a fresh package list.

4.  Install and remove specific packages.

sudo apt-get install <package name>

sudo apt-get remove <package name>

This removes just the package.

Purge remove:
sudo apt-get purge <package name>

This removes the config files and the package.