Absolutely Tech

[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!

Category: Ubuntu (Linux)

Tagged: , , ,

  • http://www.shakaran.net shakaran

    You have an error sintaxis:
    sh: cannot create etc/apt/apt.conf.d/99ignoresave: Directory nonexistent

    It have a missing / on /etc:
    sudo sh -c “echo ‘Dir::Ignore-Files-Silently:: “(.save|.distupgrade)$”;’ > /etc/apt/apt.conf.d/99ignoresave”

    Regards.

  • http://www.shakaran.net shakaran

    You have an error sintaxis:
    sh: cannot create etc/apt/apt.conf.d/99ignoresave: Directory nonexistent

    It have a missing / on /etc:
    sudo sh -c “echo ‘Dir::Ignore-Files-Silently:: \”(.save|.distupgrade)$\”;’ > /etc/apt/apt.conf.d/99ignoresave”

    Regards.

  • http://www.techmindz.com Deepak Mittal

    Sorry, it was a typo. Thanks for correcting it.

  • http://www.techmindz.com Deepak Mittal

    Sorry, it was a typo. Thanks for correcting it.

  • http://www.extrospection.com Anders Jacobsen

    Anyone encountering this problem should be aware it’s a known and (soon) fixed bug in Ubuntu 10.10: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/631770

    My recommendation to anyone experiencing odd behaviour in their Ubuntu installation in the future would be to submit a bug for it and let the developers sort it for everybody!

  • http://www.extrospection.com Anders Jacobsen

    Anyone encountering this problem should be aware it’s a known and (soon) fixed bug in Ubuntu 10.10: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/631770

    My recommendation to anyone experiencing odd behaviour in their Ubuntu installation in the future would be to submit a bug for it and let the developers sort it for everybody!

  • http://www.techmindz.com Deepak Mittal

    And until it’s fixed, this workaround fixes things.

  • http://www.techmindz.com Deepak Mittal

    And until it’s fixed, this workaround fixes things.

  • http://marenostrum.blogsome.com/ Deniz Ogut

    Thank you. It solved my problem.

  • http://www.khattam.info _khAttAm_

    Thanks for this workaround. I was getting this error with apt 0.8.6 on Debian Testing. This fix helped.

    However, now I have upgraded my apt to 0.8.8 from Debian Unstable and seems like apt does not show errors even when this fix is not in place.

  • http://www.absolutelytech.com Deepak Mittal

    Thanks for informing. I haven’t removed the fix yet so didn’t know it was fixed. I will update the post :)

  • http://www.khattam.info _khAttAm_

    Yeah but I’m not sure it is available for Ubuntu (from the bug report page though, it seems Maverick gets a fixed version, but not sure if it was just a proposed, i.e. maverick-proposed, or is available via std repos). I use Debian these days.

  • Blacky

    That worked! Thanks!

  • Michael Lewinger

    Just use the suffix .list instead of .repo.

Ubuntu 11.04

The next version of Ubuntu is coming soon

Follow me

Sponsors