19

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?

22

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 '19 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 '20 at 2:11
0

It is the recommended way:

"To override the configuration it is recommended to create an other APT configuration file fragment which overrides the shipped default value because updates to to shipped configuration file may conflict with the local changes blocking updating unattended-upgrades itself. The new file should sort later than 50unattended-upgrades to be parsed later than the one shipping the default values, it can be e.g. 52unattended-upgrades-local."

This is from README.md file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.