Zypper Tips and Tricks
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
You must be logged in to post a comment.
Comments
[...] This one will be invaluable to me: http://opensuse-tutorials.com/2008/07/zypper-tips-and-tricks/ [...]
Kalle Persson » Blog Archive » Quick link: Zypper tutorial
July 23rd, 2008
[...] de openSUSE Tutorials. Etiquetas: opensuse, yast, [...]
Mini-tutorial de zypper | LloguiWorld
July 23rd, 2008
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,[…..
/var/log/livio
July 24th, 2008
For info of a package I use
zypper info package
(more data is printed =) )
Alex Rodriguez
July 28th, 2008
[...] http://opensuse-tutorials.com/2008/07/zypper-tips-and-tricks/ [...]
Ganux - Terengganu Linux » Blog Archive » OpenSUSE zypper package management
July 29th, 2008
it’s really help.
mustakim
August 18th, 2008
[...] http://opensuse-tutorials.com/2008/07/zypper-tips-and-tricks Posted in OpenSUSE 11. [...]
openSUSE 11 zypper tips and tricks « Snakeeyes Weblog
August 18th, 2008
[...] 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. [...]
Zypper Package Manager « Stand on the shoulders of giants
August 18th, 2008
Interesting. Added message about you on my site
Dave
August 25th, 2008
[...] Some problems that need fix OpenSUSE tutoral may also be [...]
Some problems that need fix - openSUSE Forums
November 23rd, 2008
[...] link tersebut ke repository anda dengan menggunakan perintah zypper (tutorial lengkap zypper klik disini) pada console [...]
The Perfect Desktop - Opensuse 11.1 di Acer 4530 « Sy4msi’s Weblog
January 12th, 2009
[...] tips and tricks http://opensuse-tutorials.com/2008/0…ps-and-tricks/ houghi — All opinions are not equal. Some are a very great deal more robust, sophisticated and [...]
zypper tips and tricks | keyongtech
January 18th, 2009