We use that to provision machine images:
echo 'Binary::apt::Apt::Cmd::Disable-Script-Warning "true";' >/etc/apt/apt.conf.d/disable-script-warning
export DEBIAN_FRONTEND=noninteractive
update all packages
apt update -y
apt -y upgrade
apt -y dist-upgrade
This creates a lot of output like:
Get:1 https://mirror.hetzner.com/ubuntu/packages jammy InRelease
...
Fetched 38.8 MB in 4s (10.5 MB/s)
Preparing to unpack .../00-libdw1_0.186-1ubuntu0.1_amd64.deb
Unpacking libdw1:amd64 (0.186-1ubuntu0.1) over (0.186-1build1)
Setting up python3-jinja2 (3.0.3-1ubuntu0.4) ...
The following additional packages will be installed
How to make this more silent, so I only see warnings and errors?