Zypper
From NippAero
Manage software repositories vi the command line with Zypper.
Contents |
Listing Defined Repositories
The general syntax:
repos, lr
Output:
# zypper lr # | Enabled | Refresh | Type | Alias | Name --+---------+---------+--------+---------+-------------------------- 1 | Yes | No | rpm-md | factory | factory 2 | Yes | Yes | yast2 | guru | guru 3 | Yes | No | rpm-md | packman | Packman 10.3 4 | Yes | No | rpm-md | updates | openSUSE-10.3-Updates 5 | Yes | Yes | yast2 | main-no | Main Repository (NON-OSS) 6 | No | Yes | yast2 | main | Main Repository (OSS)
Adding Repositories
The general syntax:
addrepo, ar <URI> <alias>
Output:
# zypper ar http://packman.iu-bremen.de/suse/10.3 pm * Adding repository 'pm' Repository 'pm' successfully added: Enabled: Yes Autorefresh: Yes URL: http://packman.iu-bremen.de/suse/10.3
Removing Repositories
The general syntax:
removerepo, rr <URI|alias>
Output:
zypper rr http://packman.iu-bremen.de/suse/10.3
Updating the System
The general syntax:
update, up
Update the system. By default this command applies all needed patches. To update other types of resolvables (e.g. packages) use the -t option.
- -t, --type - Type of resolvable (default: patch)
- -r, --repo <alias> - List only updates from the repository specified by the alias.
- --skip-interactive - Skip interactive updates.
- -l, --auto-agree-with-licenses - Automatically say 'yes' to the third party license agreement prompt. See man zypper for more details.
- --best-effort - Do a 'best effort' approach to update, updates to lower than the latest-and-greatest version are also possible.
- --debug-solver - Create a solver test case for debugging.
- -R, --force-resolution - Force the solver to find a solution, even if it would mean removing all packages with unfulfilled requirements.
Example:
linux2:~ # zypper update * Reading repository '10.3 - Main Repository (NON-OSS)' cache * Reading repository 'openSUSE-10.3-DVD 10.3' cache * Reading repository 'openSUSE-10.3-Updates' cache * Reading installed packages [100%] The following packages are going to be upgraded: cpio fvwm2 evince glibc-i18ndata glibc-locale nscd glibc release-notes wvdial gnome-main-menu gtk2 ksh The following NEW packages are going to be installed: evince-lang gnome-main-menu-lang The following NEW patches are going to be installed: gnome-main-menu release-notes evince gtk2 glibc ksh fvwm2 wvdial cpio Overall download size: 28.0 M. After the operation, additional 2.9 M will be used. Continue? [yes/no]: y Downloading package evince-lang-2.20.0-5.2.i586, 519.4 K (2.0 M unpacked) Downloading: evince-lang-2.20.0-5.2.i586.rpm * Downloading [100%] * Installing: evince-lang-2.20.0-5.2 [100%] Downloading package glibc-i18ndata-2.6.1-18.2.i586, 3.6 M (10.0 M unpacked) Downloading patch rpm: ./rpm/i586/glibc-i18ndata-2.6.1-18.2.i586.patch.rpm, 111.5 K Downloading: glibc-i18ndata-2.6.1-18.2.i586.patch.rpm * Downloading [100%] * Installing: glibc-i18ndata-2.6.1-18.2 [100%] Downloading package glibc-2.6.1-18.2.i686, 1.7 M (3.9 M unpacked) Downloading delta: ./rpm/i686/glibc-2.6.1-18_18.2.i686.delta.rpm, 89.2 K Downloading: glibc-2.6.1-18_18.2.i686.delta.rpm * Downloading [100%] Applying delta: /var/adm/mount/AP_0x00000001/rpm/i686/glibc-2.6.1-18_18.2.i686.delta.rpm * Installing: glibc-2.6.1-18.2 [100%] Downloading package release-notes-10.3.17-0.1.noarch, 113.6 K (608.5 K unpacked) Downloading delta: ./rpm/noarch/release-notes-10.3.16_10.3.17-2_0.1.noarch.delta.rpm, 42.8 K Downloading: release-notes-10.3.16_10.3.17-2_0.1.noarch.delta.rpm * Downloading [100%] Applying delta: /var/adm/mount/AP_0x00000001/rpm/noarch/release-notes-10.3.16_10.3.17-2_0.1.noarch.delta.rpm * Installing: release-notes-10.3.17-0.1 [100%] ...
