Using Pacman

ConnochaetOS applies the pacman package manager from Arch Linux. Parts of this document are shamelessly stolen from the Arch Linux Wiki at http://wiki.archlinux.org/index.php/Pacman

Overview

Pacman keeps the system up to date by synchronizing package lists with the master server. This server/client model also allows you to download/install packages with a simple command, complete with all required dependencies.

Pacman is written in the C programming language, so it is fast, light and very agile. It uses the .tar.xz package format, which further enhances its speed; Xzipped tarballs are decompressed much faster than many other formats and are therefore generally installed more expediently.

Configuration

Pacman configuration is located in /etc/pacman.conf. In depth information about the configuration file can be found in “man pacman”.

General options

General options are in [options] section. Read the man page or look in the default pacman.conf for information on what can be done here.

Using proxy server

Setting pacman for using proxy server is possible through adding directives like

ProxyServer=192.168.1.1
ProxyPort=1080

Repositories

In this section you define which repositories to use, as referred to in /etc/pacman.conf.

You can find there two predefined repos. These are the official Connochaetos repos:

[connos]
Include= /etc/pacman.d/mirrorlist

[connos-extra]
Include = /etc/pacman.d/mirrorlist

Don't worry about the mirrorlists – this method is used because it allows easier usage of multiple repos. Both entries connect you to the Connochaetos server.

There are some unofficial repos of ConnochaetOS user on other servers. Ask for the URLs in the forum and add the entries following the commented description in the pacman.conf file.

Usage

To really learn what pacman can do, read man pacman. The below is just a small sample of operations that can be performed.

Installing and Removing Packages

Before installing and upgrading packages, it is a good idea to synchronize the local package database with the remote repositories.

pacman -Sy

or

pacman --sync --refresh

To install or upgrade a single package or list of packages (including dependencies), issue the following command:

pacman -U http://www.connochaetos.org/os/i586/<repo name>/<package_name-version>.pkg.tar.gz

or

pacman -S <package_name1> <package_name2>

You can also refresh the package database before installing a package in one command:

pacman -Sy <package_name>

To remove a single package, leaving all of its dependencies installed:

pacman -R <package_name>

To remove all of the packages dependencies which aren't used by any other installed package:

pacman -Rs <package_name>

Upgrading the System

Pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date your system is.

pacman -Su

However, the best option is to synchronize the repository databases AND update your system in one go with the following:

pacman -Syu

Querying the Package Database

Pacman can search and query the local package database with the -Q flag. See

pacman -Q --help

or the pacman(8) manpage for more details. Sync databases can be searched and queried with the -S flag. See either the manpage just mentioned or

pacman -S --help

for details.

pacman -Ss | more

for example lists all the packages with name and title

Other Usage

Pacman is quite an extensive package management tool, here is just a brief collection of other features.

  • Download a package without installing it:

pacman -Sw package_name

  • Install a local package (not from a repository):

pacman -U /path/to/package/package_name-version.pkg.tar.gz

You may also enter a URL:

pacman -U http://www.examplepackage/repo/examplepkg.tar.gz

For a more detailed list of switches please refer to pacman –help or man pacman.

 
Back to top
configuration/pacman.txt · Last modified: 2012/02/12 17:42 by slowlife
 
 
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0