Package Management With Zypper
As I've mentioned before I'm an openSUSE user, and as long as they don't make the "U" lower case again, I'll probably stick with it. When it comes to package management, OpenSUSE and SUSE Linux Enterprice (and SuSE before them) are usually associated with YaST (and yes, I'm still waiting for them to upper case the "a"). YaST works well but it's a bit verbose for installing a single package, and of course that's just more fodder for the apt-getters with all their apt-get install this and their apt-get install thats. And you can't argue with them, but there are other options with openSUSE: yum and apt4rpm come to mind, but the preferred solution is zypper.
Zypper is a command line tool for package management, it's based on ZYpp, aka libzypp. The WikiPedia entry for Zypp says:
Unlike other common package managers, it provides a powerful satisfiability solver to compute package dependencies and a convenient package management API.
Since we don't want our heads to explode we'll just take it for granted that a powerful satisfiability solver is a good thing.
It turns out that YaST is also (now) based on ZYpp so you don't need to worry that you're missing out on something by using zypper.
Zypper is fairly straightforward to use. If you want to search for a package do zypper search STRING.... The STRING(s) can include * and ? wildcards and there are options for matching all or any of the strings and for full exact matches (the default is a partial match). If you want to search the package descriptions there's an option for that also. For example to search for packages with the word "mail" in the name or in the description do:
$ zypper search --search-descriptions mail $ # --search-descriptions can be abbreviated as -d Reading installed packages... S | Name | Summary | Type --+----------------------+----------------------------------------+----------- | Buddi | Buddi - Personal budget software ... | package | CgEddie | A simple editor with syntax high ... | package | FrostWire | Gnutella peer-to-peer (P2P) file ... | package ... i | yast2-mail | YaST2 - Mail Configuration | package | yast2-mail-plugins | YaST2-Users/Group Plugins for the ... | package | yum-updatesd | YUM update notification daemon | package
When installing packages with zypper, as you'd expect/hope, zypper takes care of installing the package's dependencies:
$ zypper install Buddi Reading installed packages... The following NEW packages are going to be installed: BrowserLauncher2 swingx Buddi jcommon jfreechart Overall download size: 4.1 M. After the operation, additional 5.2 M will be used. Continue? [YES/no]:
Some of the other interesting commands that zypper supports are:
- refresh - to refresh the package information from the repositories you have defined.
- addrepo - to add a new repository.
- remove - to remove a package.
- list-updates - to list the updates/patches that are available for the packages you have installed.
For a full list of the commands that zypper supports type zypper help and check the man page for more details.
One of Ubuntu's WOW factors seems to be apt-get dist-upgrade, i.e. the ability to upgrade to the next version of Ubuntu (and actually it's a feature of any debian based distro). This is another thing that the apt-getters puff up about, well enter zypper dist-upgrade or zypper dup. This allows you to upgrade from one version of openSUSE to the next. I have not used this feature yet, but posts on the openSUSE wiki seem to indicate that it works well.
So to all you apt-getters out there, all I can say is: zypp it.
Mitch Frazier is an Associate Editor for Linux Journal.
Webinar: 8 Signs You’re Beyond Cron
On Demand NOW
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.View Now!
|Dr Hjkl on the Command Line||May 21, 2015|
|Initializing and Managing Services in Linux: Past, Present and Future||May 20, 2015|
|Goodbye, Pi. Hello, C.H.I.P.||May 18, 2015|
|Using Hiera with Puppet||May 14, 2015|
|Urgent Kernel Patch for Ubuntu||May 12, 2015|
|Gartner Dubs DivvyCloud Cool Cloud Management Vendor||May 12, 2015|
- Initializing and Managing Services in Linux: Past, Present and Future
- Dr Hjkl on the Command Line
- Goodbye, Pi. Hello, C.H.I.P.
- Using Hiera with Puppet
- Mumblehard--Let's End Its Five-Year Reign
- Gartner Dubs DivvyCloud Cool Cloud Management Vendor
- Infinite BusyBox with systemd
- Urgent Kernel Patch for Ubuntu
- It's Easier to Ask Forgiveness...
- A More Stable Future for Ubuntu