วันศุกร์, เมษายน 22, 2554

Ubuntu: Cleaning (your home made/apt-mirror) ubuntu's mirror

    After config apt-mirror to mirroring the Ubuntu Natty 11.04 my office's Ubuntu repository got seriously  out of disk spaces.
PS: my repository use 500GB HDD.
    So, after talk with the college we decided to remove oldest released from our repository; Hardy (8.04 LTS) and Jaunty (9.04).

To cleanup the repository:
- edit the /etc/apt/mirror.list
$ sudo vim /etc/apt/mirror.list
- remove or remark all lines that have word hardy or jaunty (to tell apt-mirror not to download their files or we did not want them anymore :P )
- save changed
- use command (command I got from their configuration file.)
$ sudo /var/spool/apt-mirror/var/clean.sh 

Notice/learn from apt-mirror config file
...
############# config ##################
#
set base_path /var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
set mirror_path $base_path/mirror
set skel_path $base_path/skel
set var_path $base_path/var
set cleanscript $var_path/clean.sh

...

- after execute clean command, let's it do its work.
- you will get your free space back soon.

ไม่มีความคิดเห็น :