[SOLVED] “Ignoring file ‘.distUpgrade’ / ‘.save’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension” on Ubuntu 10.10

Recently apt-get update started throwing notices which read:

Ignoring file 'opera.list.distUpgrade' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Ignoring file 'opera.list.save' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

It occured because sources.list.d directory isn’t supposed to contain files with .distupgrade and .save extensions, but since I upgraded my distribution from 10.04, backup copies of the source files were made with .distUpgrade appended to them. Similarly .save files were not supposed to be in the directory which made it throw this error. Fortunately you can suppress this error by executing the following command:

sudo sh -c "echo 'Dir::Ignore-Files-Silently:: \"(.save|.distupgrade)$\";' > /etc/apt/apt.conf.d/99ignoresave"

This will suppress the error. Next time you run sudo apt-get update you wouldn’t see those errors.

UPDATE: Apt 0.8.8 seems to have fixed the issue as mentionedby _khAttAm_ in comments. You can install it from Unstable repositories.

Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *