1

I would like to have chron run my updates periodically and I have been told that the command: apt-get dist-upgrade -y should accept the updates. My concern is that numerous times when manually updating I have run into verification failures and I only wish to automate this process if I am sure that packages with verification issues are not installed. Can anyone confirm that -y will not respond "yes" to the prompt "proceed without verification"? I am ideally hoping for a pretty definitive reference and/or a way for me to test this myself. Thanks.

3

From man apt-get:

-y, --yes, --assume-yes
   Automatic yes to prompts; assume "yes" as answer to all prompts and
   run non-interactively. If an undesirable situation, such as
   changing a held package, trying to install a unauthenticated
   package or removing an essential package occurs then apt-get will
   abort. Configuration Item: APT::Get::Assume-Yes.

You need --force-yes to accept that prompt, IIRC.

1

apt-get install -y --allow-unauthenticated

Man page:

--allow-unauthenticated
    Ignore if packages can't be authenticated and don't prompt about
    it. This can be useful while working with local repositories, but
    is a huge security risk if data authenticity isn't ensured in
    another way by the user itself. The usage of the Trusted option for
    sources.list(5) entries should usually be preferred over this
    global override. Configuration Item:
    APT::Get::AllowUnauthenticated.
1
  • Interesting, but: "I only wish to automate this process if I am sure that packages with verification issues are not installed" – muru Jan 7 '17 at 12:28

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.