zypper --non-interactive install on openSUSE
zypper --non-interactive install installs packages on openSUSE and SUSE Linux Enterprise without prompting.
zypper is the SUSE package manager. The --non-interactive (or -n) flag is essential in CI because zypper otherwise prompts for license and conflict decisions.
What it does
zypper install resolves and installs packages from the enabled repositories. --non-interactive auto-answers prompts (including license acceptance and conflict resolution with the default choice), which is required for unattended builds.
Common usage
zypper --non-interactive refresh
zypper --non-interactive install --no-recommends \
git curl ca-certificates
# shorthand
zypper -n in git curl
zypper clean --allOptions
| Flag | What it does |
|---|---|
| -n / --non-interactive | Do not prompt; accept defaults |
| --no-recommends | Do not install recommended packages |
| -i / install | Install packages (in is the alias) |
| ref / refresh | Refresh repository metadata |
| --gpg-auto-import-keys | Import unknown repo keys automatically |
| clean --all | Clear cached metadata and packages |
In CI
Put --non-interactive before the subcommand (zypper --non-interactive install). Combine with --no-recommends to keep images lean and zypper clean --all to remove caches. Use --gpg-auto-import-keys when adding a new repo in an unattended script.
Common errors in CI
"There are some running programs that use files deleted by recent upgrade" is a warning, not a failure. "No provider of '<pkg>' found" means the package or its repo is missing. "Repository '<name>' is invalid ... Valid metadata not found" means a bad or unreachable repo URL; run zypper refresh. A key prompt that blocks the build means --gpg-auto-import-keys was not passed.