list.save and list.distUpgrade
This is more of a curiosity question as I try to get a better understanding of apt and package management.
I'm seeing that in my /etc/apt/
and /etc/apt/sources.list.d/
folders I have very or sometimes identical files which have the extension of sources.list
, sources.list.distUpgrade
, sources.list.save
, and so on.
What's the point of these duplicate or similar files?
sources.list
and sources.list.save
in /etc/apt/
seem to be identical but sources.list.distUpgrade
shows quantal instead of raring for most stuff (I probably first installed quantal).
On the other hand, in the case of google-talkplugin.list
and google-talkplugin.listUpgrade
in /etc/apt/sources.list.d/
the content of the files seems to be completely identical.
Didn't find much in Google searches. I reviewed the sources.list manpage but it didn't talk much about it.
Also noticed this article where a bug related to the extensions was noted for 10.10
I am not sure about sources.list.distUpgrade, but the sources.list.save file is a backup of the sources.list file. I know from personal experience (about 5 minutes ago) that the sources.list.save file is extremely important after attempting to add a repository. If software center stops working correctly (EX: closing right after starting) then you need to replace the current sources.list file with the sources.list.save file.
To do this, open a new terminal (CTRL+ALT+T) and type the command
sudo cp /etc/apt/sources.list.save /etc/apt/sources.list
and then
sudo apt-get update
This should fix the corrupt sources.list as long as sources.list.save exists in the /etc/apt/ directory.
Simply put, sources.list.save is just a backup file.
I was concerned about whether these files are included in the repos used when updating etc packages. It seems they're not: From man sources.list
re. the sources.list.d
directory:
Filenames need to have either the extension
.list
or.sources
depending on the contained format.
it goes on to talk about ignoring files. In summary I take it to mean that only files with .list
or .sources
get used when updating packages etc. The meaning of the .save
and .distUpgrade
files is well explained in the existing answer from Strato1 and the comments there.