Package management is handled by a shell script called pacman (a pun on Package Manager). Its options are somewhat similar to Red Hat's package manager RPM. It is possible to install and remove packages and to query the database of installed packages and files.
The binary packages used by ttylinux are basically tar archives compressed with the bzip2 algorithm. You can download all the packages that normally come with the distribution from the downloads page on the ttylinux homepage. You may need to do that if you remove a package on a running ttylinux system and later want to reinstall it.
To install the package bash-3.0-2.bin.tbz, you would use the following command:
pacman -i bash-3.0-2.bin.tbz
You can also install a package from standard input, which can be useful for forming a pipe with the wget program. This allows you to install a package from the network without having to store it on the ttylinux system. For example, to download the bash package from the hypothetical foo.org web server, you would use:
wget http:/foo.org/bash-3.0-2.bin.tbz -O - | pacman -i -
Three different options are available for querying the database of installed packages and files. To get a list of all installed packages, run
pacman -qa
To find out which package the file /bin/login belongs to, use
pacman -qf /bin/login
To list all files from the e2fsprogs package, run
pacman -ql e2fsprogs
If you want to remove a package, you can do so by use of the -e option. To remove the isdn4k-utils package, you would use the following command:
pacman -e isdn4k-utils
You can also use the -v option to get verbose output during installation and removal of packages. pacman will then list all the files it has installed or removed.
The pacman script get its knowledge about installed packages and files from the directory /var/log/packages, where you can find one file per installed package. The file contains a listing of all files that belong to that particular package. pacman will not notice when you delete files by hand, it exclusively uses information found in /var/log/packages.