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

Original 📋 Debian 11 (Bullseye) 16 lines

Works On

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

Details

Size
16 lines
MD5
e99ea2a4a8db4dd2b5b90a60670d4fe0
SHA256
84cb100b000873f25f677cf23ab51f841eb490264fa496361591d6071aebf0f4
/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";

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

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/e99ea2a4a8db4dd2b5b90a60670d4fe0?hint=docker-autoremove-suggests' /><config><app>APT</app><os>Debian 11 (Bullseye)</os><location>/etc/apt/apt.conf.d/docker-autoremove-suggests</location><lines>16</lines><md5>e99ea2a4a8db4dd2b5b90a60670d4fe0</md5><sha256>84cb100b000873f25f677cf23ab51f841eb490264fa496361591d6071aebf0f4</sha256></config></prompt>

Paste into Claude, ChatGPT, or any AI assistant.

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?

Use it to restore a missing default, confirm what shipped, or diff against your current APT config.

How do I restore APT defaults?

Download the file, back up the current one in /etc/apt/apt.conf.d/docker-autoremove-suggests, replace it, then reload or restart APT.

Is docker-autoremove-suggests safe for production?

It is the vendor default for Debian 11 (Bullseye). Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Debian 11 (Bullseye).

Can I use this for APT troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.