I have a terribly limited download allowance and have multiple computers. So, my questions folks is. Would I be able to save what has been installed thru apt-get and any other terminal installations I attempt?
I have a terribly limited download allowance and have multiple computers. So, my questions folks is. Would I be able to save what has been installed thru apt-get and any other terminal installations I attempt?
When you install a package using
apt-get
correspondingdeb
files are downloaded in your/var/cache/apt/archives
. Unless user deletes them all those files should be there. You can copy and preserve them for future use.All you need is to set a local repository[Source]. Then you could install all those packages as usual using
apt-get
from it. Make a folderlocalrepo
say at you home directory and put all the.deb
files from/var/cache/apt/archives
in it.Next you need to create an index file for your repository. For that you need to install
dpkg-dev
(on your source machine only).To create index file,
It will create an index file named
Packages.gz
in~/localrepo
. In future you just need to copy the whole~/localrepo
to other machines where you want to install. If you modify the deb files in~/localrepo
you also need to update the index file.Now you need to show
apt-get
the repo editing your source list in all machines where you want to install packages from your local repository. First backup your originalsource.list
Write the following line in it and save,
Replace
<user_name>
with your exact user name. Now you are ready to install any package that exists in your source machine.You may need to give additional affirmation. As the repository is not trusted. For home use purpose it should be just enough as creation of a trusted repo requires quite a lot extra efforts. But your software center will not probably work with untrusted repo. But the advantage is that it will take care of all the dependencies for a package by itself.
If your
/var/cache/apt/archives
in your source machine do not contain any package. You can download deb files for all your existing packages using the following command in terminal,[Source]Assuming you have a server/spare box, you can setup Apt-Cacher, which will store all of the .deb files for you.