Mobile repository on Debian

2 minute read

Repositorio Móvil Debian

If by chances you have a slow connection but in another place have a better connection (school, university, work, etc.) and have a computer with Debian which on the same architecture (x86, x64, etc.)  with almost the same software selection, you can do this little trick to carry part of the downloaded packages:

Computer with good connection

Update and upgrade the computer with good connection:

dell~# aptitude update
dell:~# aptitude safe-upgrade

On Debian and alike distros the downloaded packages are stored in /var/cache/apt/archives, so you can copy the content of that directory into a pen-drive or external hard drive:

dell:~# cp -r /var/cache/apt/archives /media/usb0

Computer with poor connection

Update  the package list. Despite you have a poor connection , you still need Internet to retrieved the package’s information:

cupcake:~# aptitude update
cupcake:~# aptitude safe-upgrade

The following packages will be upgraded:
bind9-host dnsutils evolution-data-server evolution-data-server-common gdm3 gnome-shell gnome-shell-common google-chrome-stable gvfs
gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-libs host icedtea-netx icedtea-netx-common krb5-locales libbind9-80 libc-bin libc-dev-bin
libc6 libc6:i386 libc6-dev libc6-i386 libc6-i686:i386 libcairo-gobject2 libcairo2 libcamel-1.2-33 libdbus-glib-1-2 libdns88 libebackend-1.2-2
libebook-1.2-13 libecal-1.2-11 libedata-book-1.2-13 libedata-cal-1.2-15 libedataserver-1.2-16 libedataserverui-3.0-1 libglib2.0-0
libglib2.0-0:i386 libglib2.0-bin libglib2.0-data libgssapi-krb5-2 libgssapi-krb5-2:i386 libisc84 libisccc80 libisccfg82 libk5crypto3
libk5crypto3:i386 libkrb5-3 libkrb5-3:i386 libkrb5support0 libkrb5support0:i386 liblwres80 libperl5.14 libproxy0 libssh-4 libxen-4.1
libxenstore3.0 locales multiarch-support openssh-client openssh-server perl perl-base perl-modules python python-minimal vim vim-common
vim-runtime vim-tiny xserver-xorg-video-nouveau
The following packages are RECOMMENDED but will NOT be installed:
xserver-xephyr
73 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,474 kB/103 MB of archives. After unpacking 16.6 MB will be used.
Do you want to continue? [Y/n/?]

Here you can see it needs to download 103 MB. Say no by typing “n”, and copy the packages from the pen-drive to  /var/cache/apt/archives/:

cupcake:~# cp -R /media/C6A7-9F3C/archives/* /var/cache/apt/archives/

Now update the package list and try to upgrade the packages one more time:

cupcake:~# aptitude update
 root@cupcake:~# aptitude safe-upgrade
 The following packages will be upgraded:
 bind9-host dnsutils evolution-data-server evolution-data-server-common gdm3 gnome-shell gnome-shell-common google-chrome-stable gvfs
 gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-libs host icedtea-netx icedtea-netx-common krb5-locales libbind9-80 libc-bin libc-dev-bin
 libc6 libc6:i386 libc6-dev libc6-i386 libc6-i686:i386 libcairo-gobject2 libcairo2 libcamel-1.2-33 libdbus-glib-1-2 libdns88 libebackend-1.2-2
 libebook-1.2-13 libecal-1.2-11 libedata-book-1.2-13 libedata-cal-1.2-15 libedataserver-1.2-16 libedataserverui-3.0-1 libglib2.0-0
 libglib2.0-0:i386 libglib2.0-bin libglib2.0-data libgssapi-krb5-2 libgssapi-krb5-2:i386 libisc84 libisccc80 libisccfg82 libk5crypto3
 libk5crypto3:i386 libkrb5-3 libkrb5-3:i386 libkrb5support0 libkrb5support0:i386 liblwres80 libperl5.14 libproxy0 libssh-4 libxen-4.1
 libxenstore3.0 locales multiarch-support openssh-client openssh-server perl perl-base perl-modules python python-minimal vim vim-common
 vim-runtime vim-tiny xserver-xorg-video-nouveau
 The following packages are RECOMMENDED but will NOT be installed:
 xserver-xephyr
 73 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 Need to get 2,474 kB/103 MB of archives. After unpacking 16.6 MB will be used.
 Do you want to continue? [Y/n/?]

As you can see, now it needs 2,4 MB,  much less than originally needed and it will last much less in downloading with a poor connection like the Venezuela’s 3G networks (put here your preferred mobile operator’s name).

Leave a Comment