9

I'm trying to upgrade my apt configuration to use the newer DEB822-style format.

man sources.list says:

It is intended to make this format gradually the default format, deprecating the previously described one-line-style format, ...

I can add a .sources file into /etc/apt/sources.list.d/, but how do I upgrade /etc/apt/sources.list itself?

I've already tried the following:

Although this last thing works, sort of, I don’t see how it’s any good because it can’t ensure it gets read first.


apt v 1.4.9
OS: GNU/Linux Debian 9.6 (x86-64); 
Cinnamon desktop: 3.2.7; 
Linux Kernel: 4.9.0-8-amd64; 

1 Answer 1

4

The new deb822 format replaces the legacy one-line style. Hence, if you are trying to migrate to the new format, you are expected to comment all lines (by prepending them with the # symbol) in your legacy .list file (or remove the file completely) and create a new .sources file with the necessary sources in the new style.

APT reads files in the alphabetical order (earlier entries are preferred). Hence, if you want the file to be read first, name it as /etc/apt/sources.list.d/00-source.source, for example.

Within a single file, sources specified on top of the file are preferred over the following sources.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.