Offline installation of packages

From ArchWiki
Revision as of 01:15, 8 November 2008 by Xyne (talk | contribs)
Jump to: navigation, search

A short howto on installing packages while offline. It is based on byte's post from this thread and uses KDE as an example.

Download the package databases on a computer with internet access and transfer them to your computer.

For i686:

For x86_64:

Following steps will make sure you're working with up-to-date package lists, as if you ran pacman -Sy.

On home PC , do the following as root:

cd /var/lib/pacman/
mkdir -p sync/core
cd $_
tar -xzf {path-to-download}/core.db.tar.gz

cd ../..
mkdir -p sync/extra
cd $_
tar -xzf {path-to-download}/extra.db.tar.gz

cd ../..
mkdir -p sync/community
cd $_
tar -xzf {path-to-download}/community.db.tar.gz
pacman -Sp --noconfirm {package-name} > pkglist

Now open that textfile with an editor and delete all lines that are not URLs. Next, bring that list with you to a place where you have internet and either download the listed packages manually or do

wget -nv -i ../pkglist

in an empty directory. Take all the *.pkg.tar.gz files back home, put them in /var/cache/pacman/pkg and finally run

pacman -S {package-name}