Ubuntu – Is it compulsory to add “Cleaning section” while bulding local ubuntu respository

12.10aptlocalrepositorypackage-managementrepository

I am using Ubuntu 12.10 (Quantal) version and it is at EOL.

The repositories for older releases that are not supported get moved to an archive server. These repositories are available at http://old-releases.ubuntu.com.

Now I have to set up this repository on my local server so that we can fetch packages from it instead of archive server. For setting repository I am using Apt-mirror

Currently my server is Ubuntu 12.04 system and I have to set up repository for Ubuntu 12.10.
In the mirror.list file we are adding following components

  • storage location (base_path)
  • number of download threads (nthreads)
  • releases and architecture
  • Cleaning section

Here is my mirror.list file

############# config ##################
#
# set base_path    /var/spool/apt-mirror
#
# set mirror_path  $base_path/mirror
# set skel_path    $base_path/skel
# set var_path     $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch  <running host architecture>
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############

############# Src path for 12.10 #############
deb http://old-releases.ubuntu.com/ubuntu/ quantal main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ quantal-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu quantal-security main restricted universe multiverse

For this I referred following links

https://www.packtpub.com/books/content/create-local-ubuntu-repository-using-apt-mirror-and-apt-cacher

http://www.unixmen.com/setup-local-repository-ubuntu-14-0413-1013-04-server/

So I have following questions

  1. Is it compulsory to add Cleaning section in the mirror.list files.
  2. If it is compulsory then what should I add for my EOL release.

Best Answer

The clean line tells apt-mirror which directories it should check for files which are no longer present in the parent mirror (and so can be deleted).

It is not compulsory, but it is good practice for large, regularly updated mirrors.

For your particular case (mirror of EOL release), you don't need a clean line, since the EOL mirror is never going to change, so there should never be a file for it to delete.

Related Question