i have to servers, the main of them , called server1 is a working ubuntu server, with some packages hold in some version, and some of them compiled from deb-src too.

I want to make a local repository with the packages installed in server1, to replicate over my network, then if i wanted to install postgresql (with my own changes, just as it is in server 1) in server2, i could get the package from my local repo compiled and versioned just in the exact way i installed in server1

Im thinkin / searching in some kind of script just after install one deb (from official repo, or local compiled) which will rsync to my local repo server. But i dont know if it is posible or there is another cleaner way to get it.

Thanks a lot.


if you have a web server or some shared directory:

mkdir myrepo
copy all the .deb files to the myrepo folder
cd myrepo
dpkg-scanpackages ./ /dev/null |gzip > Packages.gz

then configure other machines to use that repo in /etc/apt/sources.list

deb file:/home/your-user-name/myrepo/ ./

Also apt-utils package - contains the tool apt-ftparchive which is perfect for maintaining a reasonably sized internal repository

  • I will try, but i need to know how to download the packages installed (exact version) from the official repo to myrepo directorie, can you help me with that?
    – avances123
    Apr 2 '12 at 15:21
  • im reading about aptitude-create-state-bundle maybe it can help me
    – avances123
    Apr 2 '12 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.