Skip to content

Instantly share code, notes, and snippets.

@zorbash
Created September 19, 2017 17:37
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zorbash/183b80d37bd0a09434e3a2b1a9589c15 to your computer and use it in GitHub Desktop.
Save zorbash/183b80d37bd0a09434e3a2b1a9589c15 to your computer and use it in GitHub Desktop.
# File: /etc/apt/apt.conf.d/docker-autoremove-suggests
# Since Docker users are looking for the smallest possible final images, the
# following emerges as a very common pattern:
# RUN apt-get update \
# && apt-get install -y <packages> \
# && <do some compilation work> \
# && apt-get purge -y --auto-remove <packages>
# By default, APT will actually _keep_ packages installed via Recommends or
# Depends if another package Suggests them, even and including if the package
# that originally caused them to be installed is removed. Setting this to
# "false" ensures that APT is appropriately aggressive about removing the
# packages it added.
# https://aptitude.alioth.debian.org/doc/en/ch02s05s05.html#configApt-AutoRemove-SuggestsImportant
Apt::AutoRemove::SuggestsImportant "false";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment