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.
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.
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.
-
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