Using apt-get

This entry was posted by Tuesday, 7 April, 2009
Read the rest of this entry »

Using apt-get / Installing aplications on Debian based distro’s.

This is just a quick guide to get you started on installing and upgrading software on you debian or debian based distro of linux. It is not meant to be a comprehensive guide. From here on in where I refer to Debian I mean any debian based or other distro of linux that uses apt-get.

Finding Applications / Packages.

Software for debian is stored in packages. These packages contains the files required for an application and also referances to other packages required to run the software. The fastest way to search the packages currently availible (assuming your package cache is up to date, more later) is to use apt-cache.

The basic syntax is: apt-cache search

ie. finding an irc client

$ apt-cache search "irc client"
cgiirc - web based irc client
ctrlproxy - An IRC proxy with multiserver support
tinyirc - a tiny IRC client
tirc - token's irc client
xchat - IRC client for X similar to AmIRC
xchat-text - IRC client for console similar to AmIRC
zenirc - Major mode for wasting time

I have shortened the output here …

The alternative in to browse a package archive such as But keep in mind that depending on your installation sources and version some packages may not be available to you.

Installing an Application / Packages.

Lets, for example, choose to install xchat, an excellent IRC client. To do this we simply execute this at a command prompt as ROOT user. apt-get install xchat (To log in as root type ‘su’ at the prompt and enter you root password when prompted, if you are on knoppix or your user has sudo access preffix the command with ‘sudo’)

you should get something like the following:

Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
xchat-common xchat-text
Suggested packages:
The following packages will be upgraded:
xchat xchat-common xchat-text
3 upgraded, 0 newly installed, 0 to remove and 350 not upgraded.

As you can see this will install extra required two packages. You maybe prompted to confirm the download of the packages. You should also receive a summury of sizes. On confirmation apt-get will download the packages and configure them. Some software will require user interaction and will prompt you for input.

To upgrade an existing package you similarly type apt-get upgrade

Upgrading and Updating apt-get

As the list of packages changes regularly you may need to update you cache of available packages. This is done by executing the following as root: apt-get update

To upgrade all packages on you system you can try the following (again as root) apt-get upgrade This will generally download alot of files !!!

Sometime packages will be held back because of conflicting dependancies, etc. To force this try apt-get dist-upgrade after running apt-get update then apt-get upgrade .

Last-Modified: 2007-03-07 19:38:50

Leave a Reply