Zypper is a very easy to use and powerful package manager that is very underrated. With the latest rewrites in openSUSE 11.0 of libzypp it is blazingly fast and has a few new features that many people are not aware of.
Here is a quick overview of a few of the features zypper supports
Install and remove packages by name, version, or capability.
Installing and removing packages with wildcards
# zypper rm gtk*devel*
# zypper in gtk-sharp?
Handling multiple versions of a package
# zypper in package-1.2.3
# zypper rm package>1.2.3
Install and Remove at the same time, - means remove, + means install.
# zypper in <package to install> -<package to remove> +<another package to install>
Force a re-install
# zypper in --force <package>
Install plain RPM files and satisfy dependencies from repositories from a local disk or the web.
# zypper in ./file.rpm
# zypper in http://<url>/file.rpm
Update all installed packages with newer available version where possible
To get all updates that only include patches/bug fixes you can run this command:
# zypper up
To update all packages even if they are new versions, or to upgrade from one version of openSUSE to another:
# zypper dup
Manage Source / Development Packages
Install build dependencies for a package
# zypper si -d <package>
Pattens / Metapackages
You can list all available patterns by doing:
# zypper pt
Install the pattern xfce
# zypper in -t pattern xfce
Easily manage repositories
List repositories
# zypper lr
Add a repository
# zypper ar <url> <name>
Disable the first repository
# zypper mr -d 1
Disable a repository by name
# zypper mr -d repo-oss
Remove the first repository
# zypper rr 1
Getting info on packages
Searching for a package
# zypper se banshee-1
# zypper se bans*
Searching for a pattern/metapackage
# zypper se -t pattern media
By default, searching only gives you the name, summary, and type of a package, to get more detailed information like what repository its coming from and what version it is, you can do the following.
# zypper se -s package
View a short description of a package
# zypper if package
Other Cool Tricks
You can simulate any zypper command by putting --dry-run after them
# zypper in --dry-run <package>
You can lock a package in its current state (installed/not installed)
# zypper addlock <package>
# zypper removelock <package>
To get more information on the new features of zypper and how to effectively use it, you may check out these additional resources:
http://en.opensuse.org/Zypper/Features
http://en.opensuse.org/Zypper/Usage

This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
8 Comments
1. Kalle Persson » Blo&hellip replies at 23rd July 2008 um 4:45 am :
[...] This one will be invaluable to me: http://opensuse-tutorials.com/2008/07/zypper-tips-and-tricks/ [...]
2. Mini-tutorial de zypper |&hellip replies at 23rd July 2008 um 8:39 am :
[...] de openSUSE Tutorials. Etiquetas: opensuse, yast, [...]
3. /var/log/livio&hellip replies at 24th July 2008 um 3:59 am :
tips&tricks: zypper...
w serwisie openSUSE Tutorials ukazał się interesujący (i przydatny zarazem) artykuł opisujący menedżer pakietów zypper oraz jego opcje.
polecam przeczytać każdemu, kto się interesuje openSUSE, czy nawet używa (krótko, by poznać; długo,[.....
4. Alex Rodriguez replies at 28th July 2008 um 1:49 pm :
For info of a package I use
zypper info package
(more data is printed =) )
5. Ganux - Terengganu Linux &hellip replies at 29th July 2008 um 3:04 am :
[...] http://opensuse-tutorials.com/2008/07/zypper-tips-and-tricks/ [...]
6. mustakim replies at 18th August 2008 um 6:15 am :
it’s really help.
7. openSUSE 11 zypper tips a&hellip replies at 18th August 2008 um 6:25 am :
[...] http://opensuse-tutorials.com/2008/07/zypper-tips-and-tricks Posted in OpenSUSE 11. [...]
8. Zypper Package Manager &l&hellip replies at 18th August 2008 um 10:09 pm :
[...] Well, for you all new openSUSE users like me, openSUSE tutorials website provide some very good tutorials. For a quick zypper reference, you can see it here. [...]
Leave a comment
Trackback URL for this entry | Commentfeed