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

Original 📋 Debian 10 (Buster) 59 lines

Details

Size
59 lines
MD5
76120d358bc9037bb6358e737b3050b5
SHA256
b646d08e9886f38b33e34ed3ebb71ce6825055a08ae7509030afd3e07d35ad40
/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
  {
	# linux kernels
	"linux-image";
	"linux-headers";
	"linux-image-extra";
	"linux-modules";
	"linux-modules-extra";
	"linux-signed-image";
	"linux-image-unsigned";
	# kfreebsd kernels
	"kfreebsd-image";
	"kfreebsd-headers";
	# hurd kernels
	"gnumach-image";
	# (out-of-tree) modules
	".*-modules";
	".*-kernel";
	"linux-backports-modules-.*";
	"linux-modules-.*";
        # tools
        "linux-tools";
        "linux-cloud-tools";
	# build info
	"linux-buildinfo";
	# source code
	"linux-source";
  };

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

Copy & Paste

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

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/76120d358bc9037bb6358e737b3050b5?hint=01autoremove' /><config><app>APT</app><os>Debian 10 (Buster)</os><location>/etc/apt/apt.conf.d/01autoremove</location><lines>59</lines><md5>76120d358bc9037bb6358e737b3050b5</md5><sha256>b646d08e9886f38b33e34ed3ebb71ce6825055a08ae7509030afd3e07d35ad40</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/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?

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/01autoremove, replace it, then reload or restart APT.

Is 01autoremove safe for production?

It is the vendor default for Debian 10 (Buster). 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 10 (Buster).

Can I use this for APT troubleshooting?

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