Skip to content

Instantly share code, notes, and snippets.

@marvell
Created May 18, 2015 15:29
Show Gist options
  • Save marvell/7c812736565928e602c4 to your computer and use it in GitHub Desktop.
Save marvell/7c812736565928e602c4 to your computer and use it in GitHub Desktop.
Remove APT cache (for Dockerfile)
apt-get clean autoclean
apt-get autoremove --yes
rm -rf /var/lib/{apt,dpkg,cache,log}/
@kennyhyun
Copy link

A tool for exploring each layer in a docker image https://github.com/wagoodman/dive

@leiless Thanks for introducing that. really nice.

Hi guys, simple question: what's the meaning of && rm -rf /var/lib/apt/lists/* given by the docker doc, and should I do it in my Dockerfile?

@ZYinMD ubuntu:22.04 image had it empty and it increased even if I did apt-get clean. removing it would not harm anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment