20

The folder

/etc/apt/apt.conf.d/

contains lots of files.

01autoremove
10periodic
15update-stamp
20archive
20dbus
20packagekit
50unattended-upgrades
70debconf
99synaptic
99update-notifier

What are those 01, 10, ..., 99 numbers all about?

Do they imply "read 01 first, read 99 last and let 99 overrule settings made in earlier numbers"?

Let's for example say there is only one setting in 50unattended-upgrades, where I want to overrule the default setting with my own preference.

I could edit 50unattended-upgrades directly, but then it becomes messy if the maintainer updates that file - I have to merge the changes.

Could I also create 51unattended-upgrades with just the single value I prefer and therefore overrule the default in 50unattended-upgrades?

1 Answer 1

23

Source: http://debian-handbook.info/browse/wheezy/sect.apt-get.html

Directories ending in .d

Directories with a .d suffix are used more and more often. Each directory represents a configuration file which is split over multiple files. In this sense, all of the files in /etc/apt/apt.conf.d/ are instructions for the configuration of APT. APT includes them in alphabetical order, so that the last ones can modify a configuration element defined in one of the first ones.

For example 60unattended-upgrades should overrule 50unattended-upgrades.

2
  • 2
    But files with name extension (.*) seem to be ignored.
    – jarno
    Apr 7, 2019 at 10:26
  • 1
    @jarno files in apt.conf.d/ can have a .conf extension or none at all. From the apt-conf(5) man page: > 2.all files in Dir::Etc::Parts in alphanumeric ascending order which have either no or "conf" as filename extension and which only contain alphanumeric, hyphen (-), underscore (_) and period (.) characters. Otherwise APT will print a notice that it has ignored a file, unless that file matches a pattern in the Dir::Ignore-Files-Silently configuration list - in which case it will be silently ignored.
    – DaveLak
    Apr 19, 2020 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .