APT /etc/apt/apt.conf.d/01autoremove

Original ๐Ÿ“‹ Debian 11 (Bullseye) 41 lines

Works On

Viewing:
Debian 11 (Bullseye)
Same on:
Ubuntu 20.04 LTS (Focal Fossa) Ubuntu 22.04 LTS (Jammy Jellyfish)
Other versions:

Details

Size
41 lines
MD5
ab6540f7278a05a4b7f9e58afcaa5f46
SHA256
93e7e6d2fdb36b04cb10127e3b0d1b9d19d822327fd959484639bbbd65cce004

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/ab6540f7278a05a4b7f9e58afcaa5f46?hint=01autoremove
wget:
wget -O 01autoremove https://exampleconfig.com/api/v1/config/original/ab6540f7278a05a4b7f9e58afcaa5f46?hint=01autoremove

For AI Agents

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

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

/etc/apt/apt.conf.d/01autoremove
APT
{
  NeverAutoRemove
  {
	"^firmware-linux.*";
	"^linux-firmware$";
	"^linux-image-[a-z0-9]*$";
	"^linux-image-[a-z0-9]*-[a-z0-9]*$";
  };

  VersionedKernelPackages
  {
	# kernels
	"linux-.*";
	"kfreebsd-.*";
	"gnumach-.*";
	# (out-of-tree) modules
	".*-modules";
	".*-kernel";
  };

  Never-MarkAuto-Sections
  {
	"metapackages";
	"contrib/metapackages";
	"non-free/metapackages";
	"restricted/metapackages";
	"universe/metapackages";
	"multiverse/metapackages";
  };

  Move-Autobit-Sections
  {
	"oldlibs";
	"contrib/oldlibs";
	"non-free/oldlibs";
	"restricted/oldlibs";
	"universe/oldlibs";
	"multiverse/oldlibs";
  };
};

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/01autoremove
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 01autoremove?

Restore it. Compare it. Start clean.

How do I restore APT defaults?

Download, replace, restart.

Is 01autoremove 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 11 (Bullseye).

Can I use this for APT troubleshooting?

Absolutely. Diff this against yours to spot the problem.