Chapter 12. Package Management

Table of Contents
12.1. Pkgtools
12.2. Slackpkg

12.1. Pkgtools

12.1.1. Introduction

Slackware does not use a complex package system, unlike many other Linux distributions. Package have the .tgz extension, and are usually ordinary tarballs which contain two extra files: an installation script and a package description file. Due to the simplicity of the packages the Slackware package tools do not have the means to handle dependencies. But many Slackware users prefer this approach, because dependencies often cause more problems than they solve.

Slackware has a few tools to handle packages. The most important tools will be covered in this chapter. To learn to understand the tools we need to have a look at package naming. Let's have a look at an example, imagine that we have a package with the filename bash-2.05b-i386-2.tgz. In this case the name of the package is bash-2.05b-i386-2. In the package name information about the package is seperated by the '-' character. A package name has the following meaning: "programname-version-architecture-packagerevision"

12.1.2. pkgtool

The pkgtool command provides a menu interface for some package operations. De most important menu items are "Remove" and "Setup". De "Remove" option presents a list of installed packages. You can select which packages you want to remove with the spacebar and confirm your choices with the return key. You can also deselect a package for removal with the spacebar.

The "Setup" options provides access to a few tools which can help you with configuring your system, for example: netconfig, pppconfig and xwmconfig.

12.1.3. installpkg

The installpkg command is used to install packages. installpkg needs a packagefile as a parameter. For example, if you want to install the package bash-2.05b-i386-2.tgz execute:


# installpkg bash-2.05b-i386-2.tgz

12.1.4. upgradepkg

upgradepkg can be used to upgrade packages. In contrast to installpkg it only installs packages when there is an older version available on the system. The command syntax is comparable to installpkg. For example, if you want to upgrade packages using package in a directory execute:


# upgradepkg *.tgz

As said only those packages will be installed of which an other version is already installed on the system.

12.1.5. removepkg

The removepkg can be used to remove installed packages. For example, if you want to remove the "bash" package (it is not recommended to do that!), you can execute:


# removepkg bash

As you can see only the name of the package is specified in this example. You can also remove a package by specifying its full name:


# removepkg bash-2.05b-i386-2

12.2. Slackpkg

12.2.1. Introduction

Slackpkg is a package tool written by Roberto F. Batista and Evaldo Gardenali. It helps users to install and upgrade Slackware Linux packages using one of the Slackware mirrors. Slackpkg is included in the extra/ directory on the second CD of the Slackware CD set.

12.2.2. Configuration

Slackpkg is configured through some files in /etc/slackpkg. The first thing you should do is configuring which mirror slackpkg should use. This can be done by editing the /etc/slackpkg/mirrors. This file already contains a list of mirrors, you can just uncomment a mirror close to you. For example:


ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-10.0/

This will use the Slackware Linux 10.0 tree on the ftp.nluug.nl mirror. Be sure to use a tree that matches your Slackware version. If you would like to track slackware-current you would uncomment the following line instead (when you would like to use the NLUUG mirror):


ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-current/

Slackpkg will only accept one mirror. Commenting out more mirrors will not work.

12.2.3. Updating the package lists

Before updating and installing package you have to let slackpkg download the package lists from the mirror you are using. It is a good idea to do this regularly to keep these lists up to date. The latest package lists can be fetched with:


$ slackpkg update