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

Authentic ๐Ÿ“‹ Ubuntu 18.04 LTS (Bionic Beaver) 60 lines

Compatibility

Currently viewing:
Ubuntu 18.04 LTS (Bionic Beaver)
Also compatible:
Debian 10 (Buster)
Different versions:

File Info

Size
60 lines
MD5
76120d358bc9037bb6358e737b3050b5
SHA256
b646d08e9886f38b33e34ed3ebb71ce6825055a08ae7509030afd3e07d35ad40

Quick Commands

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

How to Install APT

Debian

sudo apt update && sudo apt install apt

Ubuntu

sudo apt update && sudo apt install apt

Configuration 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.

Complete APT Configuration Guide

What is 01autoremove?
Access the original '01autoremove' configuration file for APT (Advanced Package Tool) from a fresh Ubuntu 18.04 LTS (Bionic Beaver) installation. This is the factory-default package management configuration, crucial for repository management, package pinning, and system update policies.
Technical Details
Located at '/etc/apt/apt.conf.d/01autoremove', this 60-line file controls package sources, authentication keys, proxy settings, and installation preferences. Manages software packages for millions of Debian and Ubuntu systems, from desktop installations to enterprise server deployments.
Common Configuration Question
How do you configure APT for secure package management, custom repositories, and automated updates on Ubuntu 18.04?
Why Use This Configuration?
This default configuration includes repository priorities, security settings, and package management policies. Essential for system administrators, DevOps engineers, and Linux users managing software installations and updates.

Frequently Asked Questions

When should I use this 01autoremove file?

Use this original configuration file when you need to restore APT to its default state after misconfiguration, during fresh installations, or as a baseline for customization. It's particularly useful for troubleshooting when your current config isn't working properly.

How do I restore APT to default settings?

Download this file and replace your current configuration at /etc/apt/apt.conf.d/01autoremove. Make sure to backup your existing configuration first, then restart the APT service to apply the changes.

Is this 01autoremove file secure for production use?

This is the factory-default configuration that ships with APT on Ubuntu 18.04 LTS (Bionic Beaver). While it provides a secure baseline, you should review and customize security settings based on your specific production requirements and compliance needs.

What's the difference between this and other OS versions?

This configuration is specifically from Ubuntu 18.04 LTS (Bionic Beaver). Different operating systems and versions may have slightly different default settings, security patches, or feature availability. Check the compatibility section above for other OS versions.

Can I use this configuration file for APT troubleshooting?

Yes, this original configuration is excellent for troubleshooting. Compare it with your current settings to identify modifications that might be causing issues, or temporarily replace your config with this one to isolate problems.