
Quiet and unattended installation with apt-get (2015) - timxor
https://peteris.rocks/blog/quiet-and-unattended-installation-with-apt-get/
======
LeoPanthera
This will still fail if a package upgrade prompts for a change to a
configuration file. You can force it to keep existing files and therefore not
ask. The command I use is:

DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="\--force-
confdef" -o Dpkg::Options::="\--force-confold" install blah wibble

(This also works for "upgrade" as well as "install".)

------
dsr_
I would argue that you _want_ new package installations to be verbose.

But most people could stand to have package _upgrades_ handled quietly.

apt install apticron

can do that for you. Options include "download upgraded packages and tell me
in mail", or "download and install upgraded packages and tell me in mail".

~~~
yjftsjthsd-h
For upgrades, I just configure unattended updates and call it good.

For installation verbosity, I think it really depends on your use case. On a
user system like a laptop, sure; interactive + high verbosity is good. On a
server, less so, and in a container, I would be quite happy with no output
except an exit code. (This is one of many reasons that I like Alpine Linux for
containers; apk defaults to installing with no interaction required.)

------
szczys
Unattended package installation without needing the sudo password? Where do I
sign up? /s

The topic of undocumented flags is an interesting one (passing flags to dpkg
from apt). Wish they had explained how that one was found out.

------
jimmaswell
My experience with apt-get makes me so wary of package management as a whole
that I'm finding myself afraid of winget. Centralized package management never
appealed to me and package managers have been nothing but problems (broken
state, incompatible mismatches of shared libraries, one installation at a time
only, etc) for whatever marginal benefit (disk space is a lot cheaper than it
was in the 90s and programs updating their own libraries works just fine, and
you can always drop in a new dll yourself if it's so important)

~~~
kop316
Interesting, I have had the exact opposite experience. apt-get is the
overwhleming reason I stick with Debian.

I have only seen such behavior you describe when I did a franken Debian [1] or
added unofficial repositories (which I would argue is like installing random
programs on any computer, do at your own risk). Even then, it only broke when
I did a major upgrade (For comparision, it would be like upgrading from
Windows 7 to 10). When I stick with official repositories or I understand what
I am doing with unoffficial repositories, I have never had an issue.

The one installation of a time is curious too, as I have installed lots of
programs at the same time with apt-get without issue.

[1]
[https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_Frank...](https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian)

