Use apt-get clean instead of manually removing files in /var/cache/apt/archives
[grml-debootstrap.git] / chroot-script
index 9ca8d12..b2158aa 100755 (executable)
@@ -129,6 +129,12 @@ EOF
 }
 # }}}
 
 }
 # }}}
 
+# remove now useless apt cache {{{
+remove_apt_cache() {
+  apt-get clean
+}
+# }}}
+
 # install additional packages {{{
 packages() {
   # Pre-seed the debconf database with answers. Each question will be marked
 # install additional packages {{{
 packages() {
   # Pre-seed the debconf database with answers. Each question will be marked
@@ -435,7 +441,7 @@ trap signal_handler HUP INT QUIT TERM
  install_policy_rcd
 
  for i in chrootmirror grmlrepos kernelimg_conf \
  install_policy_rcd
 
  for i in chrootmirror grmlrepos kernelimg_conf \
-     kernel packages extrapackages reconfigure hosts interfaces   \
+     remove_apt_cache kernel packages extrapackages reconfigure hosts interfaces   \
      timezone fstab hostname initrd grub_config passwords custom_scripts   \
      services ; do
      if stage $i ; then
      timezone fstab hostname initrd grub_config passwords custom_scripts   \
      services ; do
      if stage $i ; then