APT how to force sources.list update

Discussion in 'all things UNIX' started by BoerenkoolMetWorst, Jul 19, 2021.

  1. BoerenkoolMetWorst

    BoerenkoolMetWorst Registered Member

    Joined:
    Dec 22, 2009
    Posts:
    4,539
    Location:
    Outer space
    I have a modified sources.list file. Every once in a while, APT downloads an update for it. Since mine is modified, it asks whether I want to overwrite it or keep the old one(default.)
    Is there a way to force APT to download the latest version so I can let the updated version overwrite the old one?
     
  2. fblais

    fblais Registered Member

    Joined:
    Jul 31, 2008
    Posts:
    1,275
    Location:
    Québec, Canada
    o_O
    What commands are you executing exactly?
    APT never asked me about my source.list file.
    Why would you want to have yours updated/replaced since you modified it?
    I don't understand.
     
  3. zapjb

    zapjb Registered Member

    Joined:
    Nov 15, 2005
    Posts:
    5,129
    Location:
    USA still the best. But barely.
    Ime not APT but other things. Overwrite means replace what is the same but older & leave everything else.
     
  4. Rules

    Rules Registered Member

    Joined:
    Mar 3, 2009
    Posts:
    614
    Location:
    EARTH
    Maybe this can help :

    You can pass options to dpkg from apt. Interesting for you would be the option --force-confold.

    Code:
    apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
    Setting --force-confdef as well makes apt-get still update the config file if it hasn't been edited, while --force-confold will keep edited configuration files without asking.


    To make this permanent, you can also set these options in your apt.conf file:

    Dpkg::Options {
    "--force-confdef";
    "--force-confold";
    }
     
  5. reasonablePrivacy

    reasonablePrivacy Registered Member

    Joined:
    Oct 7, 2017
    Posts:
    1,392
    Location:
    Member state of European Union
    Current Debian uses /etc/apt/sources.list.d/ directory as a place for user to keep most of the manual changes.
     
  6. BoerenkoolMetWorst

    BoerenkoolMetWorst Registered Member

    Joined:
    Dec 22, 2009
    Posts:
    4,539
    Location:
    Outer space
    Thank you!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.