In my /etc/apt/sources.list.d
there are a couple of files that are not listed in apt policy
. In particular, I'm on 20.04 and the names include disco
and eoan
.
Does that mean that they are not used? If so can I just delete those files, as their names do indicate that they are not up-to-date with my system?
If it does not show in apt policy, you may remove it.
/etc/apt/sources.list.d
should only contain files, not directories. If there are directories, you may remove them with no harm as they are ignored by apt.Filenames in
/etc/apt/sources.list.d
must end in.list
or.sources
, contain only letters, digit,-
,_
and.
. See sources.list man page for the details.Any file with an invalid name can be safely removed since apt ignores that file.
You have to decide to remove or keep a file based on its content, not its name; provided the name is a valid name, of course.
If a source list has references to a disco, eon or other version repository, the source will be used.
Under normal circumstances, if the source is a reference to an old ubuntu repository, apt will not download software from this source since it will find newer versions in focal repo. So it is usually harmless to remove those files.
Some vendors may package their product for only one ubuntu version, but the software is known to work with all ubuntu versions. In this case, you should not remove the file.