Howto create Mini-repositories in debian

This tip allow us to create a small local repository to use with apt-get.

Package required: apt-utils.

If you have the packages in /any_path/repository, generate the Packages.gz with this commands:

apt-ftparchive packages /any_path/repository > Packages
gzip < /any_path/repository/Packages > /any_path/repository/Packages.gz

Or using this small script:

cd $1
apt-ftparchive packages . | tee Packages | gzip > Packages.gz

And you simply need to add in /etc/apt/sources.list:

deb copy:/any_path/ repositorio