8

Sometimes *.save files are being generated in /etc/sources.list.d/ directory and that causes error messages while using apt-get.

I wonder what causes being them generated. Is there any way to prevent them generated?

Example output error:

N: Ignoring file 'plesk.list.ai_back' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
  • Are you using nano to edit these files? – Ravexina May 31 '17 at 19:22
  • i don't edit anything. they just randomly appear. – emreaydin149 May 31 '17 at 19:27
  • Is this a local system or a remote one? did you add any PPA and do you have any file in /etc/sources.list.d/ ? – Ravexina May 31 '17 at 19:29
  • 1
    .save files won't cause any problems with apt-get. The only time that there's a problem is when you get something like .save.1. They're created as backups to .list files. It's normal. – heynnema May 31 '17 at 19:31
  • @Ravexina It's a local system. My own computer. – emreaydin149 May 31 '17 at 23:29
5

Intro

*.save files are some kind of backup from your sources file these are not going to make any trouble, cause apt ignore these files silently.

nano uses similar files too, if you get a file named *.save.1 it's because of nano, These are emergency files, when nano receives a SIGHUB or SIGTERM it will write its buffer to an emergency file to save you from data lost. For example if Terminal get closed while you have an open file or ssh connection fails (from man nano notes section).

plesk.list.ai_back is plesk backup file.

apt ignores all except *.list files . it show you some warning to let you know about these files however it also ignore some of them silently like *.save or *.bak files.

Take care of error:

As I said these are backup files, they have no impact on apt and are not harmful so it's the best to keep them instead of removing them.

What I suggest is using Dir::Ignore-Files-Silently option to add *.ai_back files to silently ignored list. what will happen is apt ignore these as before however it's not going to show you any warning anymore.

Create a file withing : /etc/apt/apt.conf.d/:

sudo nano /etc/apt/apt.conf.d/20-ignorebk

Add Dir::Ignore-Files-Silently:: "\.ai_back$"; to this file and save it.

Now you shouldn't get any warning about this kind files.

| improve this answer | |
  • I'm not sure that your "Take care of error" is the correct solution. Why make an exception for a file that's probably not supposed to be there in the first place? I had asked the poster to show me an ls and a cat so I could see what was there, but haven't heard back. I suspect my solution might end up being to just delete that file... – heynnema Jun 1 '17 at 14:54
  • apt by default ignore all of these files, they don't have any impact on apt. either apt ignore these silently or it will show you an warning. Why did I suggest to add this format to "Ignore Silently"? cause I think after removal they will be populated again. these files are not harmful and in my opinion we should keep them, why? cause they're back up files :-) – Ravexina Jun 1 '17 at 16:00
  • Until the user answers my request for a cat /etc/apt/sources.list.d/plesk.list.ai_back and ls -al /etc/apt/sources.list.d/plesk* I can't tell for sure that it's a backup of plesk.list. I've never seen a .ai_back file and it certainly doesn't belong in /etc/apt/sources.list.d/. Only .save and .list, and the occasional .save.1 (which is wrong and shouldn't be there either, but I also wouldn't make an exception for that file either). :-) – heynnema Jun 1 '17 at 17:17
  • If you search about this file, you'll end up to the "plesk" website, yes it doesn't mean these are really a plesk source file however keeping these files is not harmful, exactly because of their extension which will be ignored by apt anyway, we are just disabling the warning which still is a better option in my opinion. it's just a suggestion not the best solution which could be or not ;) – Ravexina Jun 1 '17 at 17:41
  • 1
    @Letitbe Updated the answer to fix the issue. However my answer only ignores files ending to .ai_back. – Ravexina Apr 20 at 21:59

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.