Wednesday, February 13, 2013

Debian Offline apt-get repositories

How to install debian packages/applications offline?

SOURCE MACHINE:
# make a directory to store the offline packages.
mkdir /luirepo

# copy all packages found in your cache archives directory.
cp /var/cache/apt/archives/*.deb /luirepo

# go to your directory with the copied packages.
cd /luirepo

# make packages.gz to be needed later on.
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

DESTINATION MACHINE:
# copy the folder "luirepo" in your new machine and place it in the root folder. you can use winscp for copying.
/luirepo

# edit the sources.list of your new machine. point it to the directory.
nano /etc/apt/sources.list

---------------------------------
deb file:/luirepo/ /
---------------------------------

# you're done! try to update run some installations offline

#example 1:
apt-get update

#example 2:
apt-get install build-essential



No comments:

Post a Comment