[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#959093: command to delete downloaded package lists and package cache, for container building



Quoting Simon Richter (2020-04-29 12:01:27)
> I'm trying to build a few Docker containers for various apps, and since I'm
> adding packages, I need to have package lists available during the container
> build, but I'd like to remove them before packing the final application
> container.
> 
> I can obviously do that manually, which requires me to know apt internals.
> 
> It would be nice if there was a command to remove the downloaded lists and
> the indexes (although the latter can also be removed by just dropping all
> files below /var/cache, which would be allowed in any case).

Until apt provides such a command you can do the same that mmdebstrap does,
which is to run:

	apt-get update -o Dir::Etc::SourceList=/dev/null -o Dir::Etc::SourceParts=/dev/null

https://sources.debian.org/src/mmdebstrap/0.6.1-6/mmdebstrap/#L2348

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature


Reply to: