summaryrefslogtreecommitdiff
path: root/config/chroot_local-hooks/xx-04-cleanup
diff options
context:
space:
mode:
Diffstat (limited to 'config/chroot_local-hooks/xx-04-cleanup')
-rwxr-xr-xconfig/chroot_local-hooks/xx-04-cleanup11
1 files changed, 10 insertions, 1 deletions
diff --git a/config/chroot_local-hooks/xx-04-cleanup b/config/chroot_local-hooks/xx-04-cleanup
index 560cced..0045ce4 100755
--- a/config/chroot_local-hooks/xx-04-cleanup
+++ b/config/chroot_local-hooks/xx-04-cleanup
@@ -5,9 +5,18 @@ apt-get remove --yes --purge nano vim-tiny libdiscover1 resolvconf
/usr/sbin/remove-orphans || true
# Removing unused files
find . -name *~ | xargs rm -f
-# Cleaning apt lists
+# Cleaning apt lists but keep yml files
+# TODO
+for x in $(ls /var/lib/apt/lists |grep yml)
+do
+ cp -f /var/lib/apt/lists/$x /tmp/
+done
rm -rf /var/lib/apt/lists
mkdir -p /var/lib/apt/lists/partial
+for x in $(ls /tmp |grep yml)
+do
+ cp -f /tmp/$x /var/lib/apt/lists/
+done
# Cleaning apt cache
rm -rf /var/cache/apt
mkdir -p /var/cache/apt/archives/partial