Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'm currently using apt-mirror to create a local mirror of the Debian repositories.

As the mirrored repositories will be used only by machines destined to be headless servers and as an effort to reduce the current mirroring size (around 75GB), categories like games and possibly others will never be needed.

How can I go about specifying (on the mirror.list perhaps?) what sections/categories I want to be excluded from the mirroring?

Maybe a bit subjective, but apart from games what other sections/categories could be "safely" ignored from the mirroring for my environment purposes?

My mirror.list looks as below since all the machines are using precise.

deb-amd64 precise main restricted universe multiverse
deb-i386 precise main restricted universe multiverse

deb-amd64 precise-security main restricted universe multiverse
deb-i386 precise-security main restricted universe multiverse

Also, what others would you recommend adding to the list to be mirrored for a relatively stable environment? Again I understand this is subjective, just looking for some pointers.

share|improve this question
Seems like you may want to run apt-cacher-ng instead. It will download the packages the first time any server requests them, and then serve the cached copies to any other server that requests the same. This way you don't have to store any packages your servers don't need, and every file is downloaded from the Internet only once. –  Steven Kath Apr 3 '14 at 2:00

1 Answer 1

up vote 4 down vote accepted

Sadly, apt-mirror is not capable of such tasks. Meanwhile, the debmirror tool does have such functionality:

    Never download any files whose Debian Section (games, doc, oldlibs,
    science, ...) match the regex. May be used multiple times.

This can be configured in the /etc/debmirror.conf. Just copy the example from /usr/share/doc/debmirror/examples/debmirror.conf, and do the configurations that you like. The important bit is the # @excludes_deb_section="";.

share|improve this answer
Thanks braiam. I can't confirm this yet since work has got me involved in many other higher priority tasks. will however mark as accepted and come back when i get some time allocated to optimize this again. –  Onitlikesonic Jul 26 '14 at 22:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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