When should I use this 01autoremove?
Use it to restore a missing default, confirm what shipped, or diff against your current APT config.
APT
{
NeverAutoRemove
{
"^firmware-linux.*";
"^linux-firmware$";
};
VersionedKernelPackages
{
# linux kernels
"linux-image";
"linux-headers";
"linux-image-extra";
"linux-signed-image";
# kfreebsd kernels
"kfreebsd-image";
"kfreebsd-headers";
# hurd kernels
"gnumach-image";
# (out-of-tree) modules
".*-modules";
".*-kernel";
"linux-backports-modules-.*";
# tools
"linux-tools";
};
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";
};
};
curl https://exampleconfig.com/api/v1/config/original/0b1391c01d75f95fa4ea5ac01219b515?hint=01autoremove
wget -O 01autoremove https://exampleconfig.com/api/v1/config/original/0b1391c01d75f95fa4ea5ac01219b515?hint=01autoremove
<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/0b1391c01d75f95fa4ea5ac01219b515?hint=01autoremove' /><config><app>APT</app><os>Debian 9 (Stretch)</os><location>/etc/apt/apt.conf.d/01autoremove</location><lines>48</lines><md5>0b1391c01d75f95fa4ea5ac01219b515</md5><sha256>295419b57259cb583b726064b66ffcd3b625999c637905fdc63e06432afcf752</sha256></config></prompt>
Paste into Claude, ChatGPT, or any AI assistant.
sudo apt update && sudo apt install apt
sudo apt update && sudo apt install apt
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 9 (Stretch). 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 9 (Stretch).
Can I use this for APT troubleshooting?
Yes. Diff it against yours to find drift, then restore only the sections you need.