18 lines
442 B
Bash
Executable File
18 lines
442 B
Bash
Executable File
#!/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)
|
|
|
|
find $DIR$STATE -type f -name '*_dists_*' -delete
|