I have a few questions about moving from apt-get to zypper in bash scripts.What is the equivalent of this?sudo apt-get install curl --assume-yes(where curl could be any package)I found the Zypper Cheat Sheet - openSUSE. Very nice! But I would appreciate the voice of experience here -- what's the right way to use zypper in a script where I want to auto agree to all prompts and not skip things that need a response?With my inexperience I would be tempted to use:sudo zypper --non-interactive --no-gpg-checks --quiet install --auto-agree-with-licenses curlBut is that really the equivalent of --assume-yes?What about the equivalent for these?sudo apt-get autoremove -ysudo apt-get autoclean -yThis suggests there isn't one...Is there a replacement for gdebi-core? Or is gdebi not ever needed with zypper's powerful satisfiability solver? I use gdebi for situations where I need to install a package on an older version and I have a .deb file already (but not all the dependencies).
How to use zypper in bash scripts for someone coming from apt-get?
bash;package management;apt;opensuse;zypper
zypper is not very consistent with naming flags for subcommands. For install you should use --non-interactive mode, in shortcut -n:zypper -n install curlThat might be quite confusing for someone coming from apt-get install -y curl. Although zypper's legacy option is -y/--no-confirm (sometimes the only option that actually works).According to documentation there's no way how to accept a GPG key without interactive mode:a new key can be trusted or imported in the interactive mode onlyEven with --no-gpgp-checks the GPG key will be rejected. A workaround for scripts is to use pipe and echo:zypper addrepo http://repo.example.org my_name | echo 'a'