Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 curl

But is that really the equivalent of --assume-yes?

What about the equivalent for these?

sudo apt-get autoremove -y
sudo apt-get autoclean -y

This 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).

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You have the --non-interactive option. From the man page:

Switches  to  non-interactive  mode. 
In this mode zypper doesn't ask user to type answers to various prompts, but uses default answers automatically. 
The  behaviour of this option is somewhat different than that of options like '--yes', since zypper can answer different answers to different questions. 
The answers  also  depend on other options like '--no-gpg-checks'.

There is no real correspondense to apt-get's autoremove. The closest is the --clean-deps option of the remove command, which cleans dependencies right away.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.