APT-GET-NONINTERACTIVE(8)

NAME
apt-get-noninteractive - wrapper to run apt-get non-interactively

SYNOPSIS
apt-get-noninteractive [option]s

Description
Simple wrapper that

•   sets environment variables for non-interactive use,

•   prevents daemons from restarting during upgrades,

•   forces new package configuration files installation without user prompts. (Through option -o Dpkg::Options::=--force-confask,confnew,confnew)

then forwards all arguments to apt-get.

Does not pass by default:

•   --allow-downgrades

•   --allow-remove-essential

•   --allow-change-held-packages

If you like to keep old configuration files, add the following parameter.

-o Dpkg::Options::=--force-confold

Examples
sudo apt-get-noninteractive dist-upgrade

sudo apt-get-noninteractive -o Dpkg::Options::=--force-confold install dist-upgrade

sudo apt-get-noninteractive install lxqt

sudo apt-get-noninteractive install package-name

sudo apt-get-noninteractive --allow-downgrades --allow-change-held-packages install package-name

Why is 'apt-get-noninteractive' not using the 'apt-get' option '--yes'?
Using APT (the package manager) in automatic, non-interactive mode is tricky. It's not as simple as just adding --yes to make everything work smoothly.

Some people might think that apt-get-noninteractive should automatically include --yes because of the name, but it doesn't, and for good reason.

The proper way to use apt-get-noninteractive is to:

1.  Run it without --yes.

2.  Check the output to see if something dangerous might happen (like removing a critical package).

3.  If everything looks fine, press Enter to continue.

If you are already confident about the outcome, you can run it again with --yes to skip confirmation.

If --yes were included by default, users would have to:

1.  Run plain apt-get to preview what would happen.

2.  Cancel it with Ctrl+C.

3.  Then run apt-get-noninteractive to actually apply the changes.

Advanced notes:

•   APT non-interactive mode requires setting many options and environment variables; no one wants to do that manually.

•   It's unclear if apt-get-noninteractive behaves differently from apt-get because of the extra options it passes.

•   This design is intentional and opinionated, aiming for both safety and usability.

Why does 'apt-get-noninteractive' prevent daemon restarts during upgrade?
Because daemon restarts can cause APT upgrade failures and apt-get-noninteractive is designed as a tool to easily fix broken APT.

WWW
https://www.kicksecure.com/wiki/Operating_System_Software_and_Updates#Broken_APT

AUTHOR
This man page has been written by Patrick Schleizer (adrelanos@whonix.org).