Page 1 of 1

Create a local Repository?

Posted: Tue Sep 18, 2012 6:25 pm
by at2marty
I've been searching around and can't seem to find a definitive answer to my question.

I have just finished downloading U5 to my desktop computer, and packages are being installed as I type this.

My situation is the following. I have a home desktop computer and a laptop computer, both running LMDE 64 bit edition. Both have almost the same software on them with possibly a dozen or so exceptions.

What I would like to do is transfer the downloaded packages from my desktop to my laptop to keep from having to download them all again.

Can I copy over the contents of /var/cache/apt/archives from my desktop over to my laptop and create a local repository to install the update? My plan would be to then sync any new packages downloaded to my desktop with my "local repo" on my laptop. Is there perhaps a better way to do this?

I am familiar with setting up a local repository for .rpm based distributions, but not familiar with .deb based distributions. I really don't want to run a ftp or http server on my desktop machine. Any pointers or tips are surely appreciated.

Re: Create a local Repository?

Posted: Wed Sep 19, 2012 8:23 pm
by at2marty
I kind of answered my own question in a "hackish" kind of way. Here are the steps that I took that worked for me. YMMV if you decide to try this, I don't guarantee that it will work for you.

On my laptop, I opened up a terminal and executed the following.

Code: Select all

sudo apt-get clean
I then did an rsync from my desktop to my laptop by issueing the following command.

Code: Select all

sudo rsync -av --delete <myusername>@<mydesktop>:/var/cache/apt/archives/ /var/cache/apt/archives/
After that, when I did

Code: Select all

sudo apt-get update && apt-get upgrade
The files that were there were not re-downloaded and only "new" files got downloaded.

I may try to come up with a better way to do this, but for now, if you have more than one computer running the same distribution of LMDE this can save a lot of bandwith.

Re: Create a local Repository?

Posted: Mon Sep 24, 2012 1:58 am
by sobrus
You should not use apt-get upgrade with LMDE.
Just apt-get dist-upgrade.

I've resolved this problem by using private squid proxy server (had to reinstall UP5 few times due to bugs encountered), but since you don't want to run any server - this is not a solution.