Friday, January 2, 2009

Package management - Debian and ubuntu

Debian and Ubuntu


update the local list of packages, enter in a Terminal:

#sudo apt-get update

To install all available updates:

#sudo apt-get upgrade

To install a package:

#sudo apt-get install package

To remove a package:

#sudo apt-get remove package

To permanently remove the package

#sudo apt-get purge package

To list other apt commands and options:

#apt-get help


To search for a package:

#apt-cache search package

eg) apt-cache search mp3

This will search for packages that have "mp3" in the name or description.


It is a simple command to add CDROMs to apt's sources.list file. Its syntax is a variation on this basic command line

#apt-cdrom add


It is a tool to read apt's apt.conf file and is very useful to dump it to screen. Its syntax is a variation of these basic options:

#apt-config [options] shell

Shell mode
#apt-config [options] dump
Show the configuration options in the screen
If you are behind proxy server means follow this steps

Add the following lines to /etc/apt/apt.conf (might be empty) file worked for me while the instructions above did not.

http::proxy “http://xx.xx.xx.xx:8080/”

If you need to authenticate use

http::proxy “http://DOMAIN\username:Password@FQDN.or.IP:8080/”

No comments: