creating local repo

Manoj Iyer manoj.iyer at
Fri Aug 22 01:15:01 UTC 2014

I need to create a local repo of some packages, this is for a custom 
project I am working on.

I do the following:

* download the deb packages & dependencies to /usr/local/apt/archives/
* create a directory /usr/local/apt/archives/partial
* cd to /usr/local/apt/archives/
* dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
* /usr/local/apt/archives/Packages.gz now exists.
* add /etc/apt/sources.list.d/localrepo.list
    * file:/usr/local/apt/archives/ ./
* apt-get update --fix-missing

but when I apt get install any of the packages from the local repo, it 
still looks in and downloads from there rather than 
using my local repo. I also tried adding 'file:/usr/local/apt/archives/ 
./' to sources.list instead and I have the same behavior.

Am I missing something?

Manoj Iyer
Hyperscale Server Team

More information about the ubuntu-devel mailing list