docker-devuan_paddy-hack/scripts/remove-apt-lists

20 lines
473 B
Bash

#!/bin/sh
# remove-apt-lists -- to keep Docker image size small
# Copyright (C) 2017 Olaf Meeuwissen
#
# License: GPL-3.0+
# There is no convenient Post-Invoke hook anywhere to hang this onto
# but it is nice to be able to clean up the package index files when
# you want to save space.
DIR=/
STATE=var/lib/apt/
eval $(apt-config shell DIR Dir)
eval $(apt-config shell STATE Dir::State)
state=$(readlink -f /$DIR/$STATE)
find $state -type f -name '*_dists_*' -delete