APT /etc/apt/apt.conf.d/docker-autoremove-suggests

Original ๐Ÿ“‹ Debian 9 (Stretch) 16 lines

Works On

Viewing:
Debian 9 (Stretch)
Same on:
Debian 10 (Buster) Debian 11 (Bullseye) Debian 12 (Bookworm) Debian 13 (Trixie)
Other versions:

Details

Size
16 lines
MD5
e99ea2a4a8db4dd2b5b90a60670d4fe0
SHA256
84cb100b000873f25f677cf23ab51f841eb490264fa496361591d6071aebf0f4

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/e99ea2a4a8db4dd2b5b90a60670d4fe0?hint=docker-autoremove-suggests
wget:
wget -O docker-autoremove-suggests https://exampleconfig.com/api/v1/config/original/e99ea2a4a8db4dd2b5b90a60670d4fe0?hint=docker-autoremove-suggests

For AI Agents

You are a DevOps agent. Fetch the default APT config for Debian 9 (Stretch) from https://exampleconfig.com/api/v1/config/original/e99ea2a4a8db4dd2b5b90a60670d4fe0?hint=docker-autoremove-suggests. Compare with my current /etc/apt/apt.conf.d/docker-autoremove-suggests and summarize differences and safe changes.

Copy this prompt into Claude, ChatGPT, or other AI assistants.

/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";

Install APT

Debian

sudo apt update && sudo apt install apt

Ubuntu

sudo apt update && sudo apt install apt

File Location

File Path
/etc/apt/apt.conf.d/docker-autoremove-suggests
Directory
/etc/apt/apt.conf.d/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this docker-autoremove-suggests?

Restore it. Compare it. Start clean.

How do I restore APT defaults?

Download, replace, restart.

Is docker-autoremove-suggests safe for production?

Yes. This is exactly what shipped. Safe starting point.

How does this differ from other OS versions?

Defaults change. This one is specific to Debian 9 (Stretch).

Can I use this for APT troubleshooting?

Absolutely. Diff this against yours to spot the problem.