Do "setups" exist in linux? (installing packages offline)

inf1nity

Golden Member
Mar 12, 2013
1,181
3
0
okay so heres the thing. I DO NOT have a permanent internet connection. I have a mobile broadband device that belongs to someone else and i rarely get to use it.

Now due to some issues i'm gonna have to re-install ubuntu again and i'll lose all my installed software. So my question- is there a way to save the .deb files on your hard disk along with all their dependencies so that you can install them whenever you want buy running dpkg or something even when you don't have an internet connection?

List of things i've tried.
1. Used the "Generate package download script" option in Synaptic. It created a script file, and nothing happened when i ran it.
2. looked up keryx but they say its been outta development and may not work with newer versions.
3.Searched in my /var/apt-get/cache for some deb files but didn't find any.

What do i do now..? These are the 4 packages that i really-really need desperately-

synaptic
vlc
gcc
chromium-browser
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
You can setup a debian mirror using the program apt-mirror. The setup for apt-mirror is very similar to the setup for apt-get. You specify a list of sources to mirror in a file. Once you have the mirrors setup you can download all of the packages for a given repository to your local disk. Then just configure apt-get to use your local repository for packages.

Note that the repositories are huge... I don't know if they are feasible to download when you do get access to the internet though.

If setting up a full mirror won't work, you can use apt-cacher to setup a cached mirror that will only pull the packages you select.
 

lxskllr

No Lifer
Nov 30, 2004
60,124
10,586
126
Unless you've done something unusual, all your packages should still be in the cache. Look in /var/cache/apt
 

inf1nity

Golden Member
Mar 12, 2013
1,181
3
0
You can setup a debian mirror using the program apt-mirror.

unfortunately that's not a viable option for me.. because of the reason that you yourself mentioned in your post.


Unless you've done something unusual, all your packages should still be in the cache. Look in /var/cache/apt
I ran the autoclean command while trying to fix the original problem problem, so no.
 

lxskllr

No Lifer
Nov 30, 2004
60,124
10,586
126
What about getting on a wifi network somewhere? You could also pay someone to download the repos, and send them to you on DVDs,
 

inf1nity

Golden Member
Mar 12, 2013
1,181
3
0
Hmm.. i think i'm just gonna reinstall them from the scratch since i do have the device with me for tonight. Do you know how to configure apt-get so as to not delete the downloaded deb files after installing. As far as i understand it does that by default in Ubuntu.
 

lxskllr

No Lifer
Nov 30, 2004
60,124
10,586
126
Checking it in an Ubuntu 12.04 live session, it looks like apt-get saves the cache by default.
 

inf1nity

Golden Member
Mar 12, 2013
1,181
3
0
well my mistake then. Thanks for taking the pains sir much appreciated..!!