Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 2
    Seriously?  There’s a -n option and a -y option and they mean the same thing but they must be placed at different positions in the command line?  Yes, that’s confusing.  (To be clear: I am not shooting the messenger; I’m saying that the developer should have thought more about usability issues.) Commented Jul 19, 2019 at 14:46
  • @G-Man - well, sort of. :) zypper has a -n option. The install sub command has both a -y option which is a convenience that aliases to the global -n option, and also has its own -n which is short for --name. It's possible to install packages by capability. So, zypper install -n blah specifies to only resolve the package named blah and not consider packages which provide blah. Without that, zypper can resolve based on the provides section from an RPM (including version comparisons), which can make dependency resolution easier. zypper install 'python>3.5' for example. Commented Jul 19, 2019 at 20:26
  • The main use for zypper install -n is if maybe you want to install a specific package whose name is a capability provided by others. For example, maybe there are a few vi implementations, and you only want a specific package named vi without resolution falling back to gvim (which provides vi) in the event that the specific vi package is for some reason missing in your repo. Personally, I dislike the confusing nature of the short options and rarely use them in scripts or anything else someone (like me) might need to read later. :D Commented Jul 19, 2019 at 20:32
  • i'm really confused by zypper addrepo url alias | echo 'a'. specifically, piping zypper output into echo. i tried echo a | zypper ... without any luck. Commented Jan 22, 2022 at 22:15