NAME
zypper - Command-line interface to ZYpp system management library (libzypp)SYNOPSIS
zypper [--global-opts] command [--command-opts] [command-arguments]DESCRIPTION
zypper is a command-line interface to ZYpp system management library (libzypp). It can be used to install, update, remove software, manage repositories, perform various queries, and more.CONCEPTS
Most of the following concepts are common for all applications based on the libzypp package management library, but there are some zypper specifics.System Packages
The set of installed packages on a system is sometimes denoted as repository @System or System Packages. In contrast to available repositories providing packages which can be installed, @System provides packages which can only be deleted. Installed packages which are not also provided by at least one of the available repositories are often denoted as being unwanted, orphaned or dropped.Repositories
Libzypp works with repository metadata, this is information about packages and their relations extracted from RPM packages and other data like patch information, pattern definitions, etc. These data are stored together with the RPM files in folders called repositories. Repositories can be placed on various media like an HTTP or FTP server, DVD, or a folder on a local disc.GPG checks
Disabling GPG checks is not recommended. Signing data enables the recipient to verify that no modifications occurred after the data were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system and in extreme cases even to a system compromise.Resource Identifiers (URI)
To specify locations of repositories or other resources (RPM files, .repo files) you can use any type of URI supported by libzypp. In addition Zypper accepts a special URI identifying openSUSE Build Service (OBS) repositories in the addrepo command. These URIs have the form of obs://project /[platform].Refresh
Refreshing a repository means downloading metadata of packages from the medium (if needed), storing it in local cache (typically under /var/cache/zypp/raw/ alias directory) and preparsing the metadata into .solv files (building the solv cache), typically under /var/cache/zypp/solv/alias.Services
Services are one level above repositories and serve to manage repositories or to do some special tasks. Libzypp currently supports Repository Index Service (RIS) and Plugin Service.Package Types
Zypper works with several types of resource objects, called resolvables. A resolvable might be a package, patch, pattern, product; basically any kind of object with dependencies to other objects.An ordinary RPM package.
A released patch conflicts with the
affected/vulnerable versions of a collection of packages. As long as any of
these affected/vulnerable versions are installed, the conflict triggers and
the patch is classified as needed, or as unwanted if the patch
is locked.
Selecting the patch, the conflict is resolved by updating all installed and
affected/vulnerable packages to a version providing the fix. When updating the
packages zypper always aims for the latest available version. Resolved patches
are classified as either applied or not needed, depending on
whether they refer to actually installed packages.
So installation, update or removal of packages may change the classification of
patches referring to these packages. Since libyzpp-17.23.0 the
/var/log/zypp/history remembers if a committed transaction changes a patchs
classification. If history data are available, patch tables show a column
telling since when the patch is in it’s current state.
Depending on the kind of defect, patches are classified by category and
severity. Commonly used values for category are security,
recommended, optional, feature, document or
yast. Commonly used values for severity are critical,
important, moderate, low or unspecified.
Note that the patch command does not apply optional patches
(category optional or feature) by default. If you actually want
to consider all optional patches as being needed, say patch
--with-optional. Specific patches can be applied using the install
command (e.g. zypper install patch:openSUSE-2014-7).
If the issuer decides to retract a released patch, the patch status will be
shown as retracted. The packages provided by the retracted patch are
still visible but also tagged as having been retracted ( R). The
resolver will avoid selecting retracted packages automatically. If you are
sure that a retracted package should be installed on your system, you must
explicitly select it.
A group of packages required or recommended to
install some functionality.
A group of packages which are necessary to
install a product.
Source code package (.src.rpm). This type
works in search and install commands.
Legacy: Since libzypp-17.7.0 this type is no
longer available.
Package Dependencies
Software packages depend on each other in various ways. Packages usually require or recommend other packages, but they can also conflict with them. Packages may support specific hardware or language settings. Zypper uses a dependency solver to find out which packages need to be installed to satisfy the user’s request.Automatically installed packages
Packages added by the dependency solver in order to resolve a user’s request are remembered as having been automatically installed. They may later be removed, if no more user installed packages depend on them (e.g. by zypper remove --clean-deps).Package File Conflicts
File conflicts happen when two packages attempt to install files with the same name but different contents. This may happen if you are installing a newer version of a package without erasing the older version, of if two unrelated packages each install a file with the same name.COMMANDS
zypper provides a number of commands. Each command accepts the options listed in the GLOBAL OPTIONS section. These options must be specified before the command name. In addition, many commands have specific options, which are listed in this section. These command-specific options must be specified after the name of the command and before any of the command arguments.General Commands
help [command]Shows help texts. If invoked without any
argument (just zypper or zypper help), zypper displays global
help text which lists all available global options and commands.
If invoked with a command name argument, zypper displays help for the
specified command, if such command exists. Long as well as short variants of
the command names can be used.
For your convenience, zypper help can also be invoked in any of the
following ways:
$ zypper -h|--help
[command]
$ zypper [command]
-h|--help
Starts a shell for entering multiple commands
in one session. Exit the shell using exit, quit, or
Ctrl-D.
The shell support is not complete so expect bugs there. However, there’s
no urgent need to use the shell since libzypp became so fast thanks to the SAT
solver and its tools (openSUSE 11.0), but still, you’re welcome to
experiment with it.
Package Management Commands
info (if) [options] name...Displays detailed information about the
specified packages.
For each specified package, zypper finds the best available version in defined
repositories and shows information for this package.
-r, --repo alias|name|#|URI
-t, --type type
--provides
--requires
--conflicts
--obsoletes
--recommends
--suggests
--supplements
Examples:
$ zypper info workrave
$ zypper info -t patch libzypp
$ zypper info -t pattern lamp_server
Work only with the repository specified by the
alias, name, number or URI. This option can be used multiple times.
Type of package (default: package). See
section Package Types for list of available package types.
Show symbols the package provides.
Show symbols the package requires.
Show symbols the package conflicts with.
Show symbols the package obsoletes.
Show symbols the package recommends.
Show symbols the package suggests.
Show symbols the package supplements.
Show information about package
workrave
Show information about patch
libzypp
Show information about pattern
lamp_server
Install or update packages.
The packages can be selected by their name or by a capability they
provide.
A capability is formed by "NAME[.ARCH][ OP
EDITION]", where ARCH is an architecture code, OP is
one of <, <=, =, >=, or > and
EDITION is "VERSION[-RELEASE]". For
example: zypper=0.8.8-2.
The NAME component of a capability is not only a package name but any
symbol provided by packages: /bin/vi, libcurl.so.3,
perl(Time::ParseDate). Just remember to quote to protect the special
characters from the shell, for example: zypper\>0.8.10 or
'zypper>0.8.10'.
If EDITION is not specified, the newest installable version will be
installed. This also means that if the package is already installed and newer
versions are available, it will get upgraded to the newest installable
version.
If ARCH is not specified, or the last dot of the capability name string
is not followed by known architecture, the solver will treat the whole string
as a capability name. If the ARCH is known, the solver will select a package
matching that architecture and complain if such package cannot be found.
Zypper is also able to install plain RPM files while trying to satisfy
their dependencies using packages from defined repositories. You can install a
plain RPM file by specifying its location in the install command arguments
either as a local path or an URI. E.g.:
$ zypper install ~/rpms/foo.rpm http://some.site/bar.rpm
Zypper will report packages that it cannot find. Further, in interactive mode,
zypper proceeds with installation of the rest of requested packages, and it
will abort immediately in non-interactive mode. In both cases zypper returns
ZYPPER_EXIT_INF_CAP_NOT_FOUND after finishing the operation.
Zypper will collect the files in a temporary plaindir repository and mark
the respective packages for installation. If --download-only is used,
the downloaded packages will be available in /var/cache/zypper/RPMS
until you actually install them or call zypper clean to clear the
package caches. They will not become part of the global package cache
at /var/cache/zypp/packages (see also the global --pkg-cache-dir
option).
In the install command, you can also specify packages you wish to remove by
prepending their names by a - or ! character. For example:
$ zypper install \!Firefox
In contrast to zypper remove Firefox which removes Firefox and its
dependent packages, the install command will try to keep dependent packages
installed by looking for Firefox alternatives.
Note that if you choose to use - with the first package you specify, you
need to write -- before it to prevent its interpretation as a command
option:
$ zypper install -- -boring-game great-game
great-game-manual
-r, --repo alias|name|#|URI
-t, --type type
-n, --name
-f, --force
--oldpackage
--from alias|name|#|URI
-C, --capability
-l, --auto-agree-with-licenses
--auto-agree-with-product-licenses
--replacefiles
-D, --dry-run
--details
-y, --no-confirm
--allow-unsigned-rpm
Solver related options:
--debug-solver
--force-resolution
-R, --no-force-resolution
--solver-focus MODE
--recommends
--no-recommends
Download-and-install mode options:
-d, --download-only
--download-in-advance
--download-in-heaps
--download-as-needed
--download mode
Expert Options:
--allow-downgrade, --no-allow-downgrade
--allow-name-change, --no-allow-name-change
--allow-arch-change, --no-allow-arch-change
--allow-vendor-change, --no-allow-vendor-change
Examples:
$ zypper install -t pattern lamp_server
$ zypper install --no-recommends gv
$ zypper install virtualbox-ose-2.0.6
$ zypper install virtualbox-ose=2.0.6
$ zypper install virtualbox-ose = 2.0.6
Work only with the repository specified by the
alias, name, number or URI. This option can be used multiple times.
Using --repo is discouraged as it currently hides unmentioned
repositories from the resolver, leading to inexpertly decisions. In the future
--repo will become an alias for --from.
Type of package to install (default: package).
See section Package Types for list of available package types. Use
zypper se -t type [name] to look for available items of
this type and zypper info -t type name to display more detailed
information about the item.
If patch is specified, zypper will install and/or remove packages to
satisfy specified patch. This is a way to ensure that specific bug fix is
installed. Use zypper list-patches to look for applicable patches.
If product or pattern are specified, zypper ensures that all
required (and optionally recommended) packages are installed.
Select packages by their name, don’t
try to select by capabilities.
Install even if the item is already installed
(reinstall), downgraded or changes vendor or architecture.
Allows one to replace a newer item with an
older one. Handy if you are doing a rollback. Unlike --force it will not
enforce a reinstall, if the item is already installed with the requested
version.
Select packages from specified repository. If
strings specified as arguments to the install command match packages in
repositories specified in this option, they will be marked for installation.
This option currently implies --name, but allows using wildcards for
specifying packages.
Select packages by capabilities.
Automatically say yes to third party
license confirmation prompt. By using this option, you choose to agree with
licenses of all third-party software this command will install. This option is
particularly useful for administrators installing the same set of packages on
multiple machines (by an automated process) and have the licenses confirmed
before.
Automatically accept product licenses only.
This is used by tools like SUSEconnect, which ask for confirmation before the
product gets registered. So there’s no need to confirm the product
license again at install time.
Install the packages even if they replace
files from other, already installed, packages. Default is to treat file
conflicts as an error. --download-as-needed disables the file conflict
check because access to all packages file lists is needed in advance in order
to perform the check.
Test the installation, do not actually install
any package. If used together with --download-only a meaningful file
conflict check can be performed (see section Package File
Conflicts).
Show the detailed installation summary.
Don’t require user interaction.
It’s recommended to use the --non-interactive global option
instead. Global options are passed before the command ( zypper
--non-interactive COMMAND ...). Unlike the no-confirm command
option, the global option can be used together with any zypper command.
Silently install unsigned rpm packages given
as commandline parameters.
Create solver test case for debugging. Use
this option if you think the dependencies were not solved correctly. When
using this option no packages will be installed or removed. Instead a solver
test case is written to /var/log/zypper.solverTestCase. You can pack the
directory and attach it to your bug report.
Force the solver to find a solution by
allowing to remove packages with unfulfilled requirements. This is the default
when removing packages ( zypper remove). This option overrides
--no-force-resolution in case both are specified on the command
line.
Do not force the solver to find a solution.
Instead, report dependency problems and prompt the user to resolve them
manually. This is the default except when removing packages ( zypper
remove).
Set the solvers general attitude when
resolving a job. Valid modes are Job, Installed or
Update. See section Package Dependencies for details.
Install also recommended packages in addition
to the required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Do not install recommended packages, but only
required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Only download the packages for later
installation (see also the global --pkg-cache-dir option).
If used together with --dry-run a meaningful file conflict check can be
performed (see section Package File Conflicts).
First download all packages, then start
installing. This is the default.
Download a minimal set of packages that can be
installed without leaving the system in broken state, and install them. Then
download and install another heap until all are installed. This helps to keep
the system in consistent state without the need to download all
packages in advance, which combines the advantages of
--download-in-advance and --download-as-needed. This is the
default mode.
Note
While the resolver is not capable of building heaps, this behaves the same as
--download-in-advance.
Download one package, install it immediately,
and continue with the rest until all are installed.
Use the specified download-and-install mode.
Available modes are: only, in-advance, in-heaps,
as-needed. See corresponding --download-mode options for
their description.
Don’t use them unless you know you need
them.
Whether to allow downgrading installed
resolvables.
Whether to allow changing the names of
installed resolvables. Setting this to no will not replace packages
which have been renamed.
Whether to allow changing the architecture of
installed resolvables.
Whether to allow changing the vendor of
installed resolvables. Setting this to no might be useful if you do not
want packages from foreign repos being changed to the distributions version
(or vice versa).
Install lamp_server pattern.
Install GhostScript viewer, but ignore
recommended packages.
Install version 2.0.6 of virtualbox-ose
package.
Install specified source packages and their
build dependencies. If the name of a binary package is given, the
corresponding source package is looked up and installed instead.
This command will try to find the newest available versions of the source
packages and uses rpm -i to install them, optionally together with all
the packages that are required to build the source package. The default
location where rpm installs source packages to is
/usr/src/packages/{SPECS,SOURCES}, but the values can be changed in
your local rpm configuration. In case of doubt try executing rpm --eval
"%{_specdir} and %{_sourcedir}".
Note that the source packages must be available in repositories you are using.
You can check whether a repository contains any source packages using the
following command:
-d, --build-deps-only
-D, --no-build-deps
-r, --repo alias|name|#|URI
--download-only
Examples:
$ zypper si -d dbus-1
$ zypper search -t srcpackage -r
alias| name|#|URI
$ zypper search -t srcpackage -r
alias| name|#|URI
Install only build dependencies of specified
packages.
Don’t install build dependencies.
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
Only download the packages, do not
install.
Install build dependencies of dbus-1 source
package.
Check whether dependencies of installed
packages are satisfied.
In case that any dependency problems are found, zypper suggests packages to
install or remove to fix them.
-D, --dry-run
--details
-r, --repo alias|name|#|URI
-y, --no-confirm
Solver related options:
--debug-solver
--force-resolution
-R, --no-force-resolution
--solver-focus MODE
--recommends
--no-recommends
Expert Options:
--allow-downgrade, --no-allow-downgrade
--allow-name-change, --no-allow-name-change
--allow-arch-change, --no-allow-arch-change
--allow-vendor-change, --no-allow-vendor-change
This command also accepts the Download-and-install mode options described
in the install command.
Test the repair, do not actually do anything
to the system. If used together with --download-only a meaningful file
conflict check can be performed (see section Package File
Conflicts).
Show the detailed installation summary.
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
Don’t require user interaction.
It’s recommended to use the --non-interactive global option
instead. Global options are passed before the command ( zypper
--non-interactive COMMAND ...). Unlike the no-confirm command
option, the global option can be used together with any zypper command.
Create solver test case for debugging. Use
this option if you think the dependencies were not solved correctly. When
using this option no packages will be installed or removed. Instead a solver
test case is written to /var/log/zypper.solverTestCase. You can pack the
directory and attach it to your bug report.
Force the solver to find a solution by
allowing to remove packages with unfulfilled requirements. This is the default
when removing packages ( zypper remove). This option overrides
--no-force-resolution in case both are specified on the command
line.
Do not force the solver to find a solution.
Instead, report dependency problems and prompt the user to resolve them
manually. This is the default except when removing packages ( zypper
remove).
Set the solvers general attitude when
resolving a job. Valid modes are Job, Installed or
Update. See section Package Dependencies for details.
Install also recommended packages in addition
to the required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Do not install recommended packages, but only
required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Don’t use them unless you know you need
them.
Whether to allow downgrading installed
resolvables.
Whether to allow changing the names of
installed resolvables. Setting this to no will not replace packages
which have been renamed.
Whether to allow changing the architecture of
installed resolvables.
Whether to allow changing the vendor of
installed resolvables. Setting this to no might be useful if you do not
want packages from foreign repos being changed to the distributions version
(or vice versa).
Install newly added packages recommended by
already installed ones. This command basically re-evaluates the
recommendations of all installed packages and fills up the system accordingly.
You don’t want to call this unconditionally on small or minimal
systems, as it may easily add a large number of packages.
Called as zypper inr --no-recommends, it restricts the command to just
look for packages supporting available hardware, languages or filesystems.
Useful after having added e.g. new hardware or driver repos. This is also the
default behavior if you have set [zypp.conf:solver.onlyRequires].
-r, --repo alias|name|#|URI
-D, --dry-run
--details
Solver related options:
--debug-solver
--force-resolution
-R, --no-force-resolution
--solver-focus MODE
--recommends
--no-recommends
Expert Options:
--allow-downgrade, --no-allow-downgrade
--allow-name-change, --no-allow-name-change
--allow-arch-change, --no-allow-arch-change
--allow-vendor-change, --no-allow-vendor-change
This command also accepts the Download-and-install mode options described
in the install command.
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
Test the installation, do not actually install
anything. If used together with --download-only a meaningful file
conflict check can be performed (see section Package File
Conflicts).
Show the detailed installation summary.
Create solver test case for debugging. Use
this option if you think the dependencies were not solved correctly. When
using this option no packages will be installed or removed. Instead a solver
test case is written to /var/log/zypper.solverTestCase. You can pack the
directory and attach it to your bug report.
Force the solver to find a solution by
allowing to remove packages with unfulfilled requirements. This is the default
when removing packages ( zypper remove). This option overrides
--no-force-resolution in case both are specified on the command
line.
Do not force the solver to find a solution.
Instead, report dependency problems and prompt the user to resolve them
manually. This is the default except when removing packages ( zypper
remove).
Set the solvers general attitude when
resolving a job. Valid modes are Job, Installed or
Update. See section Package Dependencies for details.
Install also recommended packages in addition
to the required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Do not install recommended packages, but only
required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Don’t use them unless you know you need
them.
Whether to allow downgrading installed
resolvables.
Whether to allow changing the names of
installed resolvables. Setting this to no will not replace packages
which have been renamed.
Whether to allow changing the architecture of
installed resolvables.
Whether to allow changing the vendor of
installed resolvables. Setting this to no might be useful if you do not
want packages from foreign repos being changed to the distributions version
(or vice versa).
Remove (uninstall) packages.
The remove command will uninstall the selected and their dependent packages. It
will not try to install alternatives in order to keep dependent packages
installed. If you want this, use zypper install !name.
The packages can be selected by their name or by a capability they provide. For
details on package selection see the install command description.
-r, --repo alias|name|#|URI
-t, --type type
-n, --name
-C, --capability
-D, --dry-run
--details
-y, --no-confirm
Solver related options:
--debug-solver
--force-resolution
-R, --no-force-resolution
--solver-focus MODE
-u, --clean-deps
-U, --no-clean-deps
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
Type of package (default: package). See
section Package Types for list of available package types.
Since patches are not installed in sense of copying files or recording a
database entry, they cannot be uninstalled, even though zypper shows them as
installed. The installed status is determined solely based on the installed
status of its required dependencies. If these dependencies are satisfied, the
patch is rendered installed.
Select packages by their name (default).
Select packages by capabilities.
Test the removal of packages, do not actually
remove anything.
Show the detailed installation summary.
Don’t require user interaction.
It’s recommended to use the --non-interactive global option
instead. Global options are passed before the command ( zypper
--non-interactive COMMAND ...). Unlike the no-confirm command
option, the global option can be used together with any zypper command.
Create solver test case for debugging. Use
this option if you think the dependencies were not solved correctly. When
using this option no packages will be installed or removed. Instead a solver
test case is written to /var/log/zypper.solverTestCase. You can pack the
directory and attach it to your bug report.
Force the solver to find a solution by
allowing to remove packages with unfulfilled requirements. This is the default
when removing packages ( zypper remove). This option overrides
--no-force-resolution in case both are specified on the command
line.
Do not force the solver to find a solution.
Instead, report dependency problems and prompt the user to resolve them
manually. This is the default except when removing packages ( zypper
remove).
Set the solvers general attitude when
resolving a job. Valid modes are Job, Installed or
Update. See section Package Dependencies for details.
Automatically remove dependencies which become
unneeded after removal of requested packages.
No automatic removal of unneeded
dependencies.
Autoremoves installed kernels.
Automatically cleans up installed kernels according to the rules defined in
[zypp.conf:multiversion.kernels] which can be given as <version>,
latest[-N], running,
oldest[+N].
--details
-D, --dry-run
Show the detailed installation summary.
Test the removal of packages, do not actually
remove anything.
Update Management Commands
list-updates (lu) [options]List available updates.
This command will list only installable updates, i.e. updates which have no
dependency problems, or which do not change package vendor. This list is what
the update command will propose to install. To list all packages for
which newer version are available, use --all option.
-t, --type type
-r, --repo alias|name|#|URI
-a, --all
--best-effort
Expert Options:
--allow-downgrade, --no-allow-downgrade
--allow-name-change, --no-allow-name-change
--allow-arch-change, --no-allow-arch-change
--allow-vendor-change, --no-allow-vendor-change
Type of package (default: package). See
section Package Types for list of available package types.
If patch is specified, zypper acts as if the list-patches command
was executed.
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
List all packages for which newer versions are
available, regardless whether they are installable or not.
See the update command for
description.
Don’t use them unless you know you need
them.
Whether to allow downgrading installed
resolvables.
Whether to allow changing the names of
installed resolvables. Setting this to no will not replace packages
which have been renamed.
Whether to allow changing the architecture of
installed resolvables.
Whether to allow changing the vendor of
installed resolvables. Setting this to no might be useful if you do not
want packages from foreign repos being changed to the distributions version
(or vice versa).
Update installed packages with newer versions,
where possible.
This command will not update packages which would require change of package
vendor unless the vendor is specified in /etc/zypp/vendors.d, or which
would require manual resolution of problems with dependencies. Such
non-installable updates will then be listed in separate section of the summary
as " The following package updates will NOT be installed:".
To update individual packages, specify one or more package names. You can use
the * and ? wildcard characters in the package names to specify
multiple packages matching the pattern.
-t, --type type
-r, --repo alias|name|#|URI
--skip-interactive
--with-interactive
-l, --auto-agree-with-licenses
--auto-agree-with-product-licenses
--replacefiles
-D, --dry-run
--details
--best-effort
-y, --no-confirm
Solver related options:
--debug-solver
--force-resolution
-R, --no-force-resolution
--solver-focus MODE
--recommends
--no-recommends
Expert Options:
--allow-downgrade, --no-allow-downgrade
--allow-name-change, --no-allow-name-change
--allow-arch-change, --no-allow-arch-change
--allow-vendor-change, --no-allow-vendor-change
This command also accepts the Download-and-install mode options described
in the install command description.
Type of package (default: package). See
section Package Types for list of available package types.
If patch is specified, zypper acts as if the patches command was
executed.
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
This will skip interactive patches, that is,
those that need reboot, contain a message, or update a package whose license
needs to be confirmed.
Avoid skipping of interactive patches when in
non-interactive mode.
Automatically say yes to third party
license confirmation prompt. By using this option, you choose to agree with
licenses of all third-party software this command will install. This option is
particularly useful for administrators installing the same set of packages on
multiple machines (by an automated process) and have the licenses confirmed
before.
Automatically accept product licenses only.
This is used by tools like SUSEconnect, which ask for confirmation before the
product gets registered. So there’s no need to confirm the product
license again at install time.
Install the packages even if they replace
files from other, already installed, packages. Default is to treat file
conflicts as an error. --download-as-needed disables the fileconflict
check because access to all packages filelists is needed in advance in order
to perform the check.
Test the update, do not actually install or
update any package. If used together with --download-only a meaningful
file conflict check can be performed (see section Package File
Conflicts).
Show the detailed installation summary.
Do a best effort approach to update.
This method does not explicitly select packages with best version and
architecture, but instead requests installation of a package with higher
version than the installed one and leaves the rest on the dependency solver.
This method is always used for packages, and is optional for products and
patterns. It is not applicable to patches.
Don’t require user interaction.
It’s recommended to use the --non-interactive global option
instead. Global options are passed before the command ( zypper
--non-interactive COMMAND ...). Unlike the no-confirm command
option, the global option can be used together with any zypper command.
Create solver test case for debugging. Use
this option if you think the dependencies were not solved correctly. When
using this option no packages will be installed or removed. Instead a solver
test case is written to /var/log/zypper.solverTestCase. You can pack the
directory and attach it to your bug report.
Force the solver to find a solution by
allowing to remove packages with unfulfilled requirements. This is the default
when removing packages ( zypper remove). This option overrides
--no-force-resolution in case both are specified on the command
line.
Do not force the solver to find a solution.
Instead, report dependency problems and prompt the user to resolve them
manually. This is the default except when removing packages ( zypper
remove).
Set the solvers general attitude when
resolving a job. Valid modes are Job, Installed or
Update. See section Package Dependencies for details.
Install also recommended packages in addition
to the required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Do not install recommended packages, but only
required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Don’t use them unless you know you need
them.
Whether to allow downgrading installed
resolvables.
Whether to allow changing the names of
installed resolvables. Setting this to no will not replace packages
which have been renamed.
Whether to allow changing the architecture of
installed resolvables.
Whether to allow changing the vendor of
installed resolvables. Setting this to no might be useful if you do not
want packages from foreign repos being changed to the distributions version
(or vice versa).
List all applicable patches.
This command is similar to zypper list-updates -t patch.
Note that optional arguments of some of the following options must be
specified using = instead of a space.
-b, --bugzilla[=#[,...]]
--cve[=#[,...]]
--date YYYY-MM-DD[,...]
-g, --category category[,...]
--severity severity[,...]
--issue[=string[,...]]
-a, *--all
--with-optional, --without-optional
-r, --repo alias|name|#|URI
List applicable patches for all Bugzilla
issues, or issues whose number matches the given string.
List applicable patches for all CVE issues, or
issues whose number matches the given string.
List only patches issued up to, but not
including, the specified date.
List only patches with this category. See
section Package Types for a list of commonly used category
values.
List only patches with this severity. See
section Package Types for a list of commonly used severity
values.
Look for issues whose number, summary, or
description matches the specified string. Issues found by number are
displayed separately from those found by descriptions. In the latter case, use
zypper patch-info patchname to get information about issues the
patch fixes.
By default, only patches that are applicable
on your system are listed. This option causes all available released patches
to be listed. This option can be combined with all the rest of the
list-updates command options.
Whether applicable optional patches should be
treated as needed or be excluded. The default is to exclude optional
patches.
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
Check for patches. Displays a count of
applicable patches and how many of them have the security category.
See also the EXIT CODES section for details on exit status of 0,
100, and 101 returned by this command.
--updatestack-only
--with-optional, --without-optional
-r, --repo alias|name|#|URI
Check only for patches which affect the
package management itself.
Whether applicable optional patches should be
treated as needed or be excluded. The default is to exclude optional
patches.
Check for patches only in the repository
specified by the alias, name, number, or URI. This option can be used multiple
times.
Install all available needed patches.
If there are patches that affect the package management itself, those will be
installed first and you will be asked to run the patch command again.
This command is similar to zypper update -t patch.
--updatestack-only
--with-update
--with-optional, --without-optional
-b, --bugzilla #[,...]
--cve #[,...]
--date YYYY-MM-DD[,...]
-g, --category category[,...]
--severity severity[,...]
-r, --repo alias|name|#|URI
--skip-interactive
--with-interactive
-l, --auto-agree-with-licenses
--auto-agree-with-product-licenses
--replacefiles
-D, --dry-run
--details
-y, --no-confirm
Solver related options:
--debug-solver
--force-resolution
-R, --no-force-resolution
--solver-focus MODE
--recommends
--no-recommends
Expert Options:
--allow-downgrade, --no-allow-downgrade
--allow-name-change, --no-allow-name-change
--allow-arch-change, --no-allow-arch-change
--allow-vendor-change, --no-allow-vendor-change
This command also accepts the Download-and-install mode options described
in the install command description.
Install only patches which affect the package
management itself and exit.
Additionally try to update all packages not
covered by patches. This is basically the same as running zypper update
afterwards.
The option is ignored, if the patch command must update the update stack first,
thus it can not be combined with the --updatestack-only option.
Whether applicable optional patches should be
treated as needed or be excluded. The default is to exclude optional
patches.
Install patch fixing a Bugzilla issue
specified by number. Use list-patches --bugzilla command to get a list
of applicable patches for specific issues.
Install patch fixing a MITRE’s CVE
issue specified by number. Use list-patches --cve command to get a list
of applicable patches for specific issues.
Install only patches issued up to, but not
including, the specified date.
Install only patches with this category. Use
list-patches --category command to get a list of available patches with
a specific category. See section Package Types for a list of commonly
used category values.
Install only patches with this severity. Use
list-patches --severity command to get a list of available patches with
a specific severity. See section Package Types for a list of commonly
used severity values.
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
This will skip interactive patches, that is,
those that need reboot, contain a message, or update a package whose license
needs to be confirmed.
Avoid skipping of interactive patches when in
non-interactive mode.
Automatically say yes to third party
license confirmation prompt. By using this option, you choose to agree with
licenses of all third-party software this command will install. This option is
particularly useful for administrators installing the same set of packages on
multiple machines (by an automated process) and have the licenses confirmed
before.
Automatically accept product licenses only.
This is used by tools like SUSEconnect, which ask for confirmation before the
product gets registered. So there’s no need to confirm the product
license again at install time.
Install the packages even if they replace
files from other, already installed, packages. Default is to treat file
conflicts as an error. --download-as-needed disables the fileconflict
check because access to all packages filelists is needed in advance in order
to perform the check.
Test the update, do not actually update. If
used together with --download-only a meaningful file conflict check can
be performed (see section Package File Conflicts).
Show the detailed installation summary.
Don’t require user interaction.
It’s recommended to use the --non-interactive global option
instead. Global options are passed before the command ( zypper
--non-interactive COMMAND ...). Unlike the no-confirm command
option, the global option can be used together with any zypper command.
Create solver test case for debugging. Use
this option if you think the dependencies were not solved correctly. When
using this option no packages will be installed or removed. Instead a solver
test case is written to /var/log/zypper.solverTestCase. You can pack the
directory and attach it to your bug report.
Force the solver to find a solution by
allowing to remove packages with unfulfilled requirements. This is the default
when removing packages ( zypper remove). This option overrides
--no-force-resolution in case both are specified on the command
line.
Do not force the solver to find a solution.
Instead, report dependency problems and prompt the user to resolve them
manually. This is the default except when removing packages ( zypper
remove).
Set the solvers general attitude when
resolving a job. Valid modes are Job, Installed or
Update. See section Package Dependencies for details.
Install also recommended packages in addition
to the required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Do not install recommended packages, but only
required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Don’t use them unless you know you need
them.
Whether to allow downgrading installed
resolvables.
Whether to allow changing the names of
installed resolvables. Setting this to no will not replace packages
which have been renamed.
Whether to allow changing the architecture of
installed resolvables.
Whether to allow changing the vendor of
installed resolvables. Setting this to no might be useful if you do not
want packages from foreign repos being changed to the distributions version
(or vice versa).
Perform a distribution upgrade. This command
applies the state of (specified) repositories onto the system; upgrades (or
even downgrades) installed packages to versions found in repositories, removes
packages that are no longer in the repositories and pose a dependency problem
for the upgrade, handles package splits and renames, etc.
If no repositories are specified via the --from option, zypper will do a
global upgrade with all defined repositories. This global form of dup will
also consider unchanged installed packages and re-evaluate their dependencies.
This can be a problem if the system contains conflicting repositories, like
repositories for two different distribution releases. This often happens if
one forgets to remove an older release repository after adding a new one, say
openSUSE 13.1 and openSUSE 13.2.
For all repositories which have the distribution version within their URL (like
https://download.opensuse.org/distribution/ 13.1/repo/oss) using the
$releasever variable instead may be helpful
(https://download.opensuse.org/distribution/ $releasever/repo/oss). The
variable is per default substituted by the current distributions version (
13.1).
This value can be temporarily overwritten in the current zypper command by using
the --releasever global option. Calling zypper --releasever
13.2... will cause these repos to use the new location
(https://download.opensuse.org/distribution/ 13.2/repo/oss) without the
need to add/remove anything. But you’ll need to use --releasever
13.2 with every zypper command until the distribution upgrade was actually
performed. Once the dup is done, $releasever will default to the
new distribution version 13.2 and --releasever is no longer
needed.
It might be less tedious to persistently set $releasever to the target
distribution value, so --releasever is not needed at all. See section
Repository Management for more info about variable substitution and the
definition of custom variables.
Note: Performing a distribution upgrade will automatically create a
solver test case at /var/log/updateTestcase-YYYY-MM-DD-hh-mm-ss (the date and
time the command was executed).
Note: distribution upgrades in openSUSE are currently only supported
between consecutive releases. To upgrade multiple releases, upgrade each
consecutive release one at a time. For more details see
<http://en.opensuse.org/SDB:System_upgrade> and the
openSUSE release notes at
<http://doc.opensuse.org/release-notes/> .
--from alias|name|#|URI
-r, --repo alias|name|#|URI
-l, --auto-agree-with-licenses
--auto-agree-with-product-licenses
--replacefiles
-D, --dry-run
-y, --no-confirm
--details
Solver related options:
--debug-solver
--force-resolution
-R, --no-force-resolution
--solver-focus MODE
--recommends
--no-recommends
Expert Options:
--allow-downgrade, --no-allow-downgrade
--allow-name-change, --no-allow-name-change
--allow-arch-change, --no-allow-arch-change
--allow-vendor-change, --no-allow-vendor-change
This command also accepts the Download-and-install mode options described
in the install command description.
Examples:
$ zypper dup --from factory --from packman
The option can be used multiple times and
restricts the upgrade to the specified repositories only. Nevertheless all
enabled repositories are visible to the resolver and will be considered to
satisfy dependency problems.
Work only with the repository specified by the
alias, name, number, or URI.
Using --repo is discouraged as it currently hides unmentioned
repositories from the resolver, leading to inexpertly decisions. This is
because packages originally installed from the hidden repos will now be
treated as orphaned or dropped. They can be silently removed if
involved in a dependency conflict. In the future --repo will become an alias
for --from.
Automatically say yes to third party
license confirmation prompt. By using this option, you choose to agree with
licenses of all third-party software this command will install. This option is
particularly useful for administrators installing the same set of packages on
multiple machines (by an automated process) and have the licenses confirmed
before.
Automatically accept product licenses only.
This is used by tools like SUSEconnect, which ask for confirmation before the
product gets registered. So there’s no need to confirm the product
license again at install time.
Install the packages even if they replace
files from other, already installed, packages. Default is to treat file
conflicts as an error. --download-as-needed disables the fileconflict
check because access to all packages filelists is needed in advance in order
to perform the check.
Test the upgrade, do not actually install or
update any package. If used together with --download-only a meaningful
file conflict check can be performed (see section Package File
Conflicts).
Don’t require user interaction.
It’s recommended to use the --non-interactive global option
instead. Global options are passed before the command ( zypper
--non-interactive COMMAND ...). Unlike the no-confirm command
option, the global option can be used together with any zypper command.
Show the detailed installation summary.
Create solver test case for debugging. Use
this option if you think the dependencies were not solved correctly. When
using this option no packages will be installed or removed. Instead a solver
test case is written to /var/log/zypper.solverTestCase. You can pack the
directory and attach it to your bug report.
Force the solver to find a solution by
allowing to remove packages with unfulfilled requirements. This is the default
when removing packages ( zypper remove). This option overrides
--no-force-resolution in case both are specified on the command
line.
Do not force the solver to find a solution.
Instead, report dependency problems and prompt the user to resolve them
manually. This is the default except when removing packages ( zypper
remove).
Set the solvers general attitude when
resolving a job. Valid modes are Job, Installed or
Update. See section Package Dependencies for details.
Install also recommended packages in addition
to the required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Do not install recommended packages, but only
required ones. The default behavior is determined by
[zypp.conf:solver.onlyRequires].
Don’t use them unless you know you need
them.
Whether to allow downgrading installed
resolvables.
Whether to allow changing the names of
installed resolvables. Setting this to no will not replace packages
which have been renamed.
Whether to allow changing the architecture of
installed resolvables.
Whether to allow changing the vendor of
installed resolvables. Setting this to no might be useful if you do not
want packages from foreign repos being changed to the distributions version
(or vice versa).
Upgrade the system to the latest versions
provided by the factory and packman repositories.
Query Commands
search (se) [options] [querystring|capability]...Search for packages matching any of the given
search strings. * and ? wildcard characters can be used
within search strings. If the search string is enclosed in / (e.g.
/^k.*e$/) it’s interpreted as a regular expression. See
the install command for details about how to specify a
capability.
Results of the search are printed in a table with columns Status,
Name, Summary and Type of package.
In the detailed view ( se -s) all available instances of matching
packages are shown; each version in each repository on a separate line, with
columns Status, Name, Type, Version,
Architecture and Repository. For installed packages
Repository shows either a repository that provides exactly the
installed version of the package, or, if the exact version is not provided by
any known repo, (System Packages) (or @System). Those installed
packages not provided by any repo are often denoted as being unwanted,
orphaned or dropped.
The Status column can contain the following values:
i+
i
v
empty
!
. l
. R
installed by user request
installed automatically (by the resolver, see
section Automatically installed packages)
a different version is installed
neither of the above cases
a patch in needed state
is shown in the 2nd column if the item is
locked (see section Package Locks Management)
is shown in the 2nd column if the item has
been retracted (see patch in section Package Types)
The v status is only shown if the
version or the repository matters (see --details or --repo), and
the installed instance differs from the one listed in version or repository.
This command accepts the following options:
--match-substrings
--match-words
-x, --match-exact
--provides
--requires
--recommends
--suggests
--conflicts
--obsoletes
--supplements
--provides-pkg
--requires-pkg
--recommends-pkg
--supplements-pkg
--conflicts-pkg
--obsoletes-pkg
--suggests-pkg
-n, --name
-f, --file-list
-d, --search-descriptions
-C, --case-sensitive
-i, --installed-only
-u, --not-installed-only
-t, --type type
-r, --repo alias|name|#|URI
--sort-by-name
--sort-by-repo
-s, --details
-v, --verbose
Examples:
$ zypper se 'yast*'
$ zypper se -s --match-exact kernel-default
$ zypper se -dC --match-words RSI
Matches for search strings may be partial
words (default).
Matches for search strings may only be whole
words.
Searches for an exact name of the
package.
Search for packages which provide the search
strings.
Search for packages which require the search
strings.
Search for packages which recommend the search
strings.
Search for packages which suggest the search
strings.
Search for packages conflicting with the
search strings.
Search for packages which obsolete the search
strings.
Search for packages which supplement the
search strings.
Search for all packages that provide any of
the provides of the package(s) matched by the input parameters.
Search for all packages that require any of
the provides of the package(s) matched by the input parameters.
Search for all packages that recommend any of
the provides of the package(s) matched by the input parameters.
Search for all packages that supplement any of
the provides of the package(s) matched by the input parameters.
Search for all packages that conflict with any
of the package(s) matched by the input parameters.
Search for all packages that obsolete any of
the package(s) matched by the input parameters.
Search for all packages that suggest any of
the provides of the package(s) matched by the input parameters.
Useful together with dependency options,
otherwise searching in package name is default.
Search in the file list of packages. Note that
the full file list is available for installed packages only. For remote
packages only an abstract of their file list is available within the metadata
(files containing /etc/, /bin/, or /sbin/).
Search also in summaries and
descriptions.
Perform case-sensitive search.
Show only installed packages.
Show only packages which are not installed.
The old option name --uninstalled-only is still acceptable, but should be
considered deprecated.
Search only for packages of specified type.
See section Package Types for a list of available package types.
Multiple --type options are allowed.
See also the type-specific query commands like packages, patterns,
etc.
Work only with the repository specified by the
alias, name, number, or URI. This option can be used multiple times.
Sort packages by name (default).
Sort packages by repository, not by
name.
Show all available versions of matching
packages, each version in each repository on a separate line.
Like --details with additional
information where the search has matched (useful when searching for
dependencies, e.g. --provides).
Search for YaST packages (quote the string to
prevent the shell from expanding the wildcard).
Show all available versions of package
kernel-default
Look for RSI acronym (case-sensitively), also
in summaries and descriptions.
List all available packages or all packages
from specified repositories. Similar to zypper search -s -t package.
-r, --repo alias|name|#|URI
-i, --installed-only
-u, --not-installed-only
--orphaned
--suggested
--recommended
--unneeded
Just another means to specify
repositories.
Show only installed packages.
Show only packages which are not installed.
The old option name --uninstalled-only is still acceptable, but should be
considered deprecated.
Show packages which are orphaned (without
repository).
Show packages which are suggested.
Show packages which are recommended.
Show packages which are unneeded.
List all available patches from specified
repositories, including those not needed. Short for zypper lp -a.
-r, --repo alias|name_|#|URI
Just another means to specify
repositories.
List all available patterns or all patterns
from specified repositories. Similar to zypper search -s -t pattern.
-r, --repo alias|name|#|URI
-i, --installed-only
-u, --not-installed-only
Just another means to specify
repositories.
Show only installed patterns.
Show only patterns which are not installed.
The old option name --uninstalled-only is still acceptable, but should be
considered deprecated.
List all available products or all products
from specified repositories. Similar to zypper search -s -t product,
but shows also the type of the product ( base, add-on).
-r, --repo alias|name|#|URI
-i, --installed-only
-u, --not-installed-only
--xmlfwd tag
Examples:
$ zypper -x pd --xmlfwd name --xmlfwd register/target
Just another means to specify
repositories.
Show only installed products.
Show only products which are not installed.
The old option name --uninstalled-only is still acceptable, but should be
considered deprecated.
XML output only: Literally forward the XML
tag, if it is found in an installed products .prod-file (in
/etc/products.d).
Using this option, for each installed product an <xmlfwd> node will
be created inside the <product> output node of the product.
Tag defines the name (or /-separated path) of a xml-tag inside an
installed products .prod-file. If the tag is present inside the products
.prod-file, the tag and it’s content is literally forwarded into the
products <xmlfwd> output node.
The option may be specified multiple times.
List all packages providing the specified
capability (case-insensitive search). See also the install command for
info about specifying capabilities.
The command line is automatically transformed into the corresponding
search command:
$ zypper what-provides 'zypper>1.6'
For a case-sensitive search call
$ zypper search --provides --match-exact
'zypper>1.6'
$ zypper search --provides --match-exact
--case-sensitive 'zypper>1.6'
Repository Management
Zypper is able to work with YaST, RPM-MD (yum) software repositories, and plain directories containing .rpm files (no symlinks).Variable substitution:
You can use the following variables within a .repo or .service files name and URI values:Use this variable to refer to the
system’s CPU architecture.
Use this variable to refer to the base
architecture of the system. For example, iX86 machines have a base
architecture of i386, while AMD64 and Intel64 have x86_64.
Use this variable to refer to the version of
your openSUSE or SUSE Linux. The value is obtained from the
/product/version XML-node in /etc/products.d/baseproduct.
This is useful for related repositories like packman (
http://ftp.gwdg.de/pub/linux/packman/suse/$releasever), which shall
always fit the installed distribution, even after a distribution upgrade.
To help performing a distribution upgrade, the value of $releasever can
be persistently set to a user defined value by creating a custom variable with
that name (see below). This way you can easily switch all repositories using
$releasever to the new version (provided the server layouts did not
change and new repos are already available).
For a single zypper command the value of $releasever can be temporarily
overwritten by using the --releasever global option.
In addition $releasever_major will be set to the leading portion up to
(but not including) the 1st dot; $releasever_minor to the trailing
portion after the 1st dot. If there’s no dot in $releasever,
$releasever_major is the same as $releasever and
$releasever_minor is empty.
A custom repository variable is defined by
creating a file in /etc/zypp/vars.d. The variable name equals the file
name. The files first line (up to but not including the newline character)
defines the variables value. Valid variable(file) names consist of
alphanumeric chars and underscore only.
echo "99.0"
>/etc/zypp/vars.d/releasever
rm /etc/zypp/vars.d/releasever
zypper --releasever @--HERE--@ lr
-u
zypper ar -f
http://ftp.gwdg.de/pub/linux/packman/suse/ \$releasever packman
zypper ar -f
http://ftp.gwdg.de/pub/linux/packman/suse/
\${releasever}_packman
SLE-${releasever_major}${releasever_minor:+-SP-$releasever_minor}
Variable substitution within an URIs authority
is limited to host and port. Bash style definition of default
and alternate values is not supported. No variables can be used in an URIs
scheme, user and password.
Supported URI formats:
scheme:[//user[:password]@]host[:port]]/path[?query][#fragment]Special characters occurring in URI components
(like a ' @' in a password) must be %-encoded ('%40').
Optionally with devices list for
probing.
•cd:///
dvd:/subdir?devices=/dev/sr0,/dev/sr1
The ftp URL scheme supports absolute and
relative paths to the default ftp server directory (RFC1738, Section 3.2.2).
To use an absolute path, you have to prepend the path with an additional
slash, what results in a /%2f combination (second / encoded to
%2f) at the begin of the URL path. This is important, especially in
user authenticated ftp, where the users home is usually the default directory
of the server (except when the server chroots into the users home directory).
Explicit proxy settings may be passed via optional parameters proxy,
proxyport, proxyuser and proxypass.
HTTP authentication methods to use can be defined as comma separated list via
optional parameter auth. Valid methods are e.g. basic,
digest, ntlm, negotiate. Note, that this list depends on
the list of methods supported by the curl library.
SSL verification behavior can be changed using the ssl_verify option
(this should be used with care). Valid values are yes (the secure
default), host, peer or no. Host just checks that
the "Common Name" field or a "Subject Alternate Name"
field in the servers certificate matches the host name in the URL. Peer
just verifies whether the certificate provided by the server is authentic
against the chain of digital signatures found in ssl_capath. No
performs no checks at all. Yes is the secure default, performing host
and peer check.
For SSL client certificate authentication use the options ssl_clientcert
to define the path to the ssl client certificate and ssl_clientkey to
define the path to the SSL client key. Use ssl_capath to change the
directory holding the CA certificates (default is /etc/ssl/certs).
•ftp://user:pass@server/path/to/media/dir
ftp://user:pass@server/%2fhome/user/path/to/media/dir
http://user:pass@server/path
https://user:pass@server/path?proxy=foo&proxyuser=me&proxypass=pw
https://server/path?ssl_clientcert=/entitlement/1234.pem&ssl_clientkey=/entitlement/1234-key.pem
Mandatory device parameter specifying
the name of the block device to mount. The name of the optional
filesystem defaults to "auto".
•hd:/subdir?device=/dev/sda1&filesystem=reiserfs
•dir:/directory/name
Mandatory iso parameter specifying the
name of the iso file. Optional url parameter specifying the URL to the
directory containing the iso file. Optional mnt parameter specifying
the preferred attach point for the source media url. Optional
filesystem name of the filesystem used in the iso file. Defaults to
"auto".
•iso:/?iso=CD1.iso&url=nfs://server/path/to/media
iso:/?iso=CD1.iso&url=hd:/?device=/dev/hda
iso:/subdir?iso=DVD1.iso&url=nfs://nfs-server/directory&mnt=/nfs/attach/point&filesystem=udf
To use NFSv4 either use schema
tnfsv4:// or pass an optional parameter type=nfs4. Additional
mountoptions can be passed as comma separated list. Defaults to
"ro".
•nfs://nfs-server/exported/path
nfs://nfs-server/exported/path?mountoptions=ro&type=nfs4
nfs4://nfs-server/exported/path?mountoptions=ro
There is no difference between cifs and smb
scheme (any more). In both cases the cifs filesystem is used.
Additional mountoptions can be passed as comma separated list. Defaults
to "ro,guest". Specify "noguest" to turn off
"guest". This is necessary if Samba is configured to reject guest
connections.
Optional workgroup or domain parameter set the name of the
workgroup. As alternative to passing username:password in the URI
authority the parameters user and pass can be used.
•smb://servername/share/path/on/the/share
cifs://usern:passw@servername/share/path/on/the/share?mountoptions=ro,noguest
cifs://usern:passw@servername/share/path/on/the/share?workgroup=mygroup
cifs://servername/share/path/on/the/share?user=usern&pass=passw
Zypper also accepts special URIs identifying
openSUSE Build Service (OBS) repositories in the addrepo command. These
URIs have the form of obs://project/[platform],
where project is the name of the OBS project and platform is the
target platform (OS) for which the repository is intended.
If platform is omitted, openSUSE_$releasever is used unless a
value for obs.platform is defined in zypper.conf. If you are following
openSUSE_Factory or openSUSE_Tumbleweed you may need to set
these as your default platform. But we can only guess, how the directory
containing the repository that fits your distribution is named on the server.
In case of doubt you need to look up the right URL in a browser.
•obs://zypp:Head/
obs://zypp:Head/openSUSE_Factory
obs://zypp:Head/openSUSE_Factory_Staging_Gcc49_standard
Commands:
addrepo (ar) [options] URI aliasAdd a new repository specified by URI and
assign specified alias to it or specify URI to a .repo file.
Newly added repositories have auto-refresh disabled by default (except for
repositories imported from a .repo, having the auto-refresh enabled). To
enable auto-refresh use addrepo -f, or the --refresh option of
the modifyrepo command.
Also, this command does not automatically refresh the newly added repositories.
The repositories will get refreshed when used for the first time, or you can
use the refresh command after finishing your modifications with
*repo commands.
-r, --repo file.repo
-c, --check
-C, --no-check
-n, --name name
-e, --enable
-d, --disable
-f, --refresh
-F, --no-refresh
-p, --priority positive-integer
-k, --keep-packages
-K, --no-keep-packages
-g, --gpgcheck
--gpgcheck-strict
--gpgcheck-allow-unsigned
--gpgcheck-allow-unsigned-repo
--gpgcheck-allow-unsigned-package
-G, --no-gpgcheck
--default-gpgcheck
Examples:
$ zypper ar -c -n 'Packman 11.1 repo' http://packman.iu-bremen.de/suse/11.1
packman
$ zypper ar
https://download.opensuse.org/repositories/zypp:/svn/openSUSE_Factory/zypp:svn.repo
$ zypper ar myreposbackup.repo
Read URI and alias from specified .repo
file
Probe given URI.
Don’t probe URI, probe later during
refresh.
Specify descriptive name for the
repository.
Enable the repository (the default).
Add the repository as disabled. Repositories
are added as enabled by default.
Enable autorefresh of the repository. The
autorefresh is disabled by default when adding new repositories.
Disable auto-refresh for the repository.
Set the priority of the repository. Priority
of 1 is the highest, the higher the number the lower the priority.
-p 0 will set the priority back to the default ( 99). Packages
from repositories with higher priority will be preferred even in case there is
a higher installable version available in the repository with a lower
priority.
Enable RPM files caching for the
repository.
Disable RPM files caching.
Enable GPG check for this repository. The
behavior as described in section GPG checks.
Enable strict GPG check for this repository.
Even packages from signed repositories need a valid GPG signature and using
unsigned packages must be confirmed.
Short hand for
--gpgcheck-allow-unsigned-repo --gpgcheck-allow-unsigned-package
Enable GPG check but allow the repository
metadata to be unsigned.
Enable GPG check but allow installing unsigned
packages from this repository.
Disable GPG check for this repository.
Disabling GPG checks is not recommended. Signing data enables the
recipient to verify that no modifications occurred after the data were signed.
Accepting data with no, wrong or unknown signature can lead to a corrupted
system and in extreme cases even to a system compromise.
Use the global GPG check settings defined in
/etc/zypp/zypp.conf. This is the default.
Unless you have modified your zypp.conf settings, this is the same as
--gpgcheck, the behavior as described in section GPG
checks.
Add a HTTP repository, probe it, name it
Packman 11.1 repo, and use packman as alias.
Add repositories from a .repo file.
Delete repositories specified by aliases,
names, numbers, URIs or one of the aggregate options.
--loose-auth
--loose-query
-a, --all
-l, --local
-t, --remote
-m, --medium-type type
Ignore user authentication data in the
URI
Ignore query string in the URI
Apply changes to all repositories.
Apply changes to all local repositories.
Apply changes to all remote repositories
(http/https/ftp).
Apply changes to repositories of specified
type. The type corresponds to the repository URI scheme identifier like http,
dvd, etc. You can find complete list of valid types at
<http://en.opensuse.org/openSUSE:Libzypp_URIs>.
List all defined repositories or show detailed
information about those specified as arguments
The following data can be printed for each repository found on the system:
# (repository number), Alias (unique identifier), Name,
Enabled (whether the repository is enabled), GPG Check (whether
GPG check for repository metadata ( r) and/or downloaded rpm packages
(p) is enabled), Refresh (whether auto-refresh is enabled for
the repository), Priority, Type (repository meta-data type:
rpm-md, yast2, plaindir). Which of the data is shown is determined by command
line options listed below and the main.repoListColumns setting from
zypper.conf. By default, #, Alias, Name, Enabled, GPG Check and Refresh is
shown.
Repository number is a unique identifier of the repository in current set of
repositories. If you add, remove or change a repository, the numbers may
change. Keep that in mind when using the numbers with the repository handling
commands. On the other hand, using the alias instead of the number is always
safe.
To show detailed information about specific repositories, specify them as
arguments, either by alias, name, number from simple zypper lr, or by
URI; e.g. fB zypper lr factory, or zypper lr 2.
-e, --export FILE.repo|-
-a, --alias
-n, --name
-u, --uri
-p, --priority
-r, --refresh
-d, --details
-E, --show-enabled-only
-U, --sort-by-uri
-P, --sort-by-priority
-A, --sort-by-alias
-N, --sort-by-name
Examples:
$ zypper repos -e myreposbackup.repo
$ zypper lr -pu
This option causes zypper to write repository
definition of all defined repositories into a single file in repo file format.
If - is specified instead of a file name, the repositories will be
written to the standard output.
Add alias column to the output.
Add name column to the output.
Add base URI column to the output.
Add repository priority column to the
output.
Add the autorefresh column to the
output.
Show more information like URI, priority,
type, etc.
Show enabled repositories only.
Add base URI column and sort the list
it.
Add repository priority column and sort the
list by it.
Sort the list by alias.
Sort the list by name.
Backup your repository setup:
List repositories with their URIs and
priorities:
Assign new alias to the repository specified
by alias, name, number, or URI.
Examples:
$ zypper nr 8 myrepo
Rename repository number 8 to
myrepo (useful if the repo has some dreadful alias which is not usable
on the command line).
Modify properties of repositories specified by
alias, name, number, or URI or one of the aggregate options.
-n, --name name
-e, --enable
-d, --disable
-f, --refresh (legacy: -r)
-F, --no-refresh (legacy: -R)
-p, --priority positive-integer
-k, --keep-packages
-K, --no-keep-packages
-g, --gpgcheck
--gpgcheck-strict
--gpgcheck-allow-unsigned
--gpgcheck-allow-unsigned-repo
--gpgcheck-allow-unsigned-package
-G, --no-gpgcheck
--default-gpgcheck
-a, --all
-l, --local
-t, --remote
-m, --medium-type type
Examples:
$ zypper mr -kt
$ zypper mr -er updates
$ zypper mr -da
Set a descriptive name for the
repository.
Enable the repository.
Disable the repository.
Enable auto-refresh for the repository.
Disable auto-refresh for the repository.
Set the priority of the repository. Priority
of 1 is the highest, the higher the number the lower the priority.
-p 0 will set the priority back to the default ( 99). Packages
from repositories with higher priority will be preferred even in case there is
a higher installable version available in the repository with a lower
priority.
Enable RPM files caching.
Disable RPM files caching.
Enable GPG check for this repository. The
behavior as described in section GPG checks.
Enable strict GPG check for this repository.
Even packages from signed repositories need a valid GPG signature and using
unsigned packages must be confirmed.
Short hand for
--gpgcheck-allow-unsigned-repo --gpgcheck-allow-unsigned-package
Enable GPG check but allow the repository
metadata to be unsigned.
Enable GPG check but allow installing unsigned
packages from this repository.
Disable GPG check for this repository.
Disabling GPG checks is not recommended. Signing data enables the
recipient to verify that no modifications occurred after the data were signed.
Accepting data with no, wrong or unknown signature can lead to a corrupted
system and in extreme cases even to a system compromise.
Use the global GPG check settings defined in
/etc/zypp/zypp.conf. This is the default.
Unless you have modified your zypp.conf settings, this is the same as
--gpgcheck, the behavior as described in section GPG
checks.
Apply changes to all repositories.
Apply changes to all local repositories.
Apply changes to all remote repositories
(http/https/ftp).
Apply changes to repositories of specified
type. The type corresponds to the repository URI scheme identifier like http,
dvd, etc. You can find complete list of valid types at
<http://en.opensuse.org/openSUSE:Libzypp_URIs>.
Enable keeping of packages for all remote
repositories.
Enable repository updates and switch on
autorefresh for the repo.
Disable all repositories.
Refresh repositories specified by their alias,
name, number, or URI. If no repositories are specified, all enabled
repositories will be refreshed.
-f, --force
-b, --force-build
-d, --force-download
-B, --build-only
-D, --download-only
-s, --services
Force a complete refresh of specified
repositories. This option will cause both the download of raw metadata and
parsing of the metadata to be forced even if everything indicates a refresh is
not needed.
Force only reparsing of cached metadata and
rebuilding of the database. Raw metadata download will not be forced.
Force only download of current copy of
repository metadata. Parsing and rebuild of the database will not be
forced.
Only parse the metadata and build the
database, don’t download raw metadata into the cache. This will enable
you to repair damaged database from cached data without accessing network at
all.
Only download the raw metadata, don’t
parse it or build the database.
Refresh also services before refreshing
repositories.
Clean the local caches for all known or
specified repositories. By default, only caches of downloaded packages are
cleaned.
-m, --metadata
-M, --raw-metadata
-a, --all
Clean repository metadata cache instead of
package cache.
Clean repository raw metadata cache instead of
package cache.
Clean both repository metadata and package
caches.
Service Management
The services, addservice, removeservice, modifyservice, and refresh-services commands serve for manipulating services. A service is specified by its URI and needs to have a unique alias defined (among both services and repositories).Adds a service specified by URI to the
system. The alias must be unique and serves to identify the service.
Newly added services are not refreshed automatically. Use the
refresh-services command to refresh them. Zypper does not access the
service URI when adding the service, so the type of the services is unknown
until it is refreshed.
-n, --name name
-e, --enable
-d, --disable
-f, --refresh
-F, --no-refresh
Specify descriptive name for the
service.
Enable the service (this is the
default).
Add the service as disabled.
Enable auto-refresh of the service.
Disable auto-refresh of the service.
Remove specified service from the system.
Removing a service will also remove of all of its repositories.
--loose-auth
--loose-query
Ignore user authentication data in the
URI.
Ignore query string in the URI.
Modify properties of specified services.
Common Options
-n, --name name
-e, --enable
-d, --disable
-f, --refresh (legacy: -r)
-F, --no-refresh (legacy: -R)
-a, --all
-l, --local
-t, --remote
-m, --medium-type type
RIS Service Specific Options
-i, --ar-to-enable alias
-I, --ar-to-disable alias
-j, --rr-to-enable alias
-J, --rr-to-disable alias
-k, --cl-to-enable
-K, --cl-to-disable
These options are common to all types of
services and repositories.
Set a descriptive name for the service.
Enable a disabled service.
Disable the service (but don’t remove
it).
Enable auto-refresh of the service.
Disable auto-refresh of the service.
Apply changes to all services.
Apply changes to all local services.
Apply changes to all remote services.
Apply changes to services of specified
type.
These options are ignored by services other
than Repository Index Services.
Schedule an RIS service repository to be
enabled at next service refresh.
Schedule an RIS service repository to be
disabled at next service refresh.
Remove a RIS service repository to
enable.
Remove a RIS service repository to
disable.
Clear the list of RIS repositories to
enable.
Clear the list of RIS repositories to
disable.
List services defined on the system.
-u, --uri
-p, --priority
-d, --details
-r, --with-repos
-P, --sort-by-priority
-E, --show-enabled-only
-U, --sort-by-uri
-N, --sort-by-name
Show also base URI of repositories.
Show also repository priority.
Show more information like URI, priority,
type.
Show also repositories belonging to the
services.
Sort the list by repository priority.
Show enabled services only. If used together
with --with-repos a disabled services owning (manually) enabled
repositories are shown as well.
Sort the list by URI.
Sort the list by name.
Refreshing a service means executing the
service’s special task.
RIS services add, remove, or modify repositories on your system based on current
content of the repository index. A differing enabled/disabled state caused by
manually calling modify-repo on a service repository however will not
be reverted unless the --restore-status option is used, or the
repository index explicitly requests the change.
Services only manage defined repositories, they do not refresh them. To refresh
also repositories, use --with-repos option or the refresh
command.
-f, --force
-r, --with-repos
-R, --restore-status
Force a complete refresh of specified
services. This option will cause both the download of raw metadata and parsing
of the metadata to be forced even if everything indicates a refresh is not
needed.
Refresh also the service repositories.
Also restore service repositories
enabled/disabled state to the repository index default. Useful after you
manually changed some service repositories enabled state.
Package Locks Management
Package locks serve the purpose of preventing changes to the set of installed packages on the system. The locks are stored in form of a query in /etc/zypp/locks file (see also locks(5)). Packages matching this query are then forbidden to change their installed status; an installed package can’t be removed or upgraded, not installed package can’t be installed. When requesting to install, upgrade or remove such locked package, you will get a dependency problem dialog.List currently active package locks.
-m, --matches
-s, --solvables
Show the number of resolvables matched by each
lock. This option requires loading the repositories.
List the resolvables matched by each lock.
This option requires loading the repositories.
Add a package lock. Specify packages to lock
by exact name or by a glob pattern using * and ? wildcard
characters.
-r, --repo alias|name|#|URI
-t, --type type
Restrict the lock to the specified
repository.
Lock only packages of specified type (default:
package). See section Package Types for list of available package
types.
Remove specified package lock. Specify the
lock to remove by its number obtained with zypper locks or by the
package name.
-r, --repo alias|name|#|URI
-t, --type type
Restrict the lock to the specified
repository.
Restrict the lock to packages of specified
type (default: package). See section Package Types for list of
available package types.
Remove unused locks.
This command looks for locks that do not currently (with regard to repositories
used) lock any package and for each such lock it asks user whether to remove
it.
Locale Management
These commands give information about requested locales and the possibility to manage those. A locale is defined by a language code. For many packages there are locale dependent packages available which provide translations or dictionaries. To get these installed, the locale for the desired language must be marked as requested by the package manager library.List requested locales. Called without
argument, lists the locales which are already marked as requested. Specifying
certain locale(s) prints information only for this(these).
-a, --all
-p, --packages
List all available locales.
Show corresponding packages.
Add specified locale(s) to the list of
requested locales..
-n, --no-packages
Do not install corresponding packages.
Remove specified locale(s) from the list of
requested locales..
-n, --no-packages
Do not remove corresponding packages.
List requested locales.
Get the lists of packages which are available
for de and en (exact match).
Get all locales with lang code en that
have their own country code, excluding the fallback en.
Get all locales with lang code en with
or without country code.
Request de_CH and install language
dependent packages.
Other Commands
versioncmp (vcmp) version1 version2Compare the versions supplied as arguments and
tell whether version1 is older or newer than version2 or the two version
strings match.
The default output is in human-friendly form. If --terse global option is
used, the result is an integer number, negative/positive if version1 is
older/newer than version2, zero if they match.
-m, --match
Takes missing release number as any release.
For example:
$ zypper vcmp -m 0.15.3 0.15.3-2
$ zypper vcmp 0.15.3 0.15.3-2
0.15.3 matches 0.15.3-2
0.15.3 is older than 0.15.3-2
Shows the ID string of the target operating
system. The string has a form of distroname-architecture. The string is
determined by libzypp, the distroname is read from
(current-rootdir) /etc/products.d/baseproduct and the
architecture is determined from uname and CPU
flags.
Prints a report about licenses and
EULA’s of installed packages to standard output.
First, a list of all packages and their licenses and/or EULAs is shown. This is
followed by a summary, including the total number of installed packages, the
number of installed packages with EULAs that required a confirmation from the
user. Since the EULAs are not stored on the system and can only be read from
repository metadata, the summary includes also the number of installed
packages that have their counterpart in repositories. The report ends with a
list of all licenses uses by the installed packages.
This command can be useful for companies redistributing a custom distribution
(like appliances) to figure out what licenses they are bound by.
Download rpms specified on the commandline to
a local directory.
Per default packages are downloaded to the libzypp package cache (
/var/cache/zypp/packages; for non-root users
$XDG_CACHE_HOME/zypp/packages), but this can be changed by using the
global --pkg-cache-dir option.
Parsable XML-output produced by zypper --xmlout will include a
<download-result> node for each package zypper tried to download.
Upon success the location of the downloaded package is found in the
path attribute of the <localfile> subnode (xpath:
download-result/localpath@path):
--all-matches
--dry-run
-r, --repo alias|name|#|URI
--from alias|name|#|URI
<download-result> <solvable> <kind>package</kind> <name>zypper</name> <edition epoch="0" version="1.9.17" release="26.1"/> <arch>x86_64</arch> <repository name="repo-oss-update (13.1)" alias="openSUSE:repo-oss-update"/> </solvable> <localfile path="/var/cache/zypp/pac.../zypper-1.9.17-26.1.x86_64.rpm"/> </download-result>
Download all versions matching the
commandline arguments. Otherwise only the best version of each matching
package is downloaded.
Don’t download any package, just report
what would be done.
Work only with the repository specified by the
alias, name, number or URI. This option can be used multiple times.
Select packages from the specified repository
only. This option can be used multiple times.
Download source rpms for all installed
packages to a local directory.
-d, --directory dir
--delete
--no-delete
--status
Download all source rpms to this directory.
Default is /var/cache/zypper/source-download.
Delete extraneous source rpms in the local
directory. This is the default.
Do not delete extraneous source rpms.
Don’t download any source rpms, but
show which source rpms are missing or extraneous.
After each upgrade or removal of packages,
there may be running processes on the system which continue to use meanwhile
deleted files. zypper ps lists all processes using deleted files,
together with the corresponding files, and a service name hint, in case
it’s a known service. This gives a hint which services may need to be
restarted after an update. Usually programs which continue to use deleted
shared libraries. The list contains the following information:
PID
PPID
UID
Login
Command
Service
Files
-s, --short
--print format
-d, --debugFile filename
Examples:
$ zypper ps -ss
$ zypper ps -sss
$ zypper ps --print "systemctl status %s"
ID of the process
ID of the parent process
ID of the user running the process
Login name of the user running the
process
Command used to execute the process
Service name, if command is associated with a
system service
The list of the deleted files
Create a short table not showing the deleted
files. Given twice, show only processes which are associated with a system
service. Given three times, list the associated system service names
only.
For each associated system service print
format on the standard output, followed by a newline. Any %s
directive in format is replaced by the system service name.
Output a file with all proc entries that make
it into the final set of used open files. This can be submitted as additional
information in a bug report.
Show only processes associated with a system
service.
Short for zypper ps --print
"%s"; list services which might need a restart.
Let zypper print the commands to retrieve
status information for services which might need a restart.
Checks if the reboot-needed flag was set by a
previous update or install of a core library or service.
The reboot-needed flag is set if a package that provides
installhint(reboot-needed) is updated or installed. Additionally there
is a predefined list (/etc/zypp/needreboot) of well-known packages which cause
the reboot-needed flag being set unconditionally. Exit code
ZYPPER_EXIT_INF_REBOOT_NEEDED indicates that a reboot is needed, otherwise the
exit code is set to ZYPPER_EXIT_OK.
Subcommands
subcommandLists available subcommands in
/usr/lib/zypper/commands and from elsewhere on your $PATH. See
section SUBCOMMANDS for details.
GLOBAL OPTIONS
-h, --helpHelp. If a command is specified
together with --help option, command specific help is displayed.
Print zypper version number and exit.
Use the specified zypper config file instead
of the default zypper.conf. Other command line options specified
together with --config and having their counterpart in the zypper
config file are still preferred.
The order of preference with --config is as follows:
Note
Use and location of the system-wide /etc/zypp/zypp.conf can not be
changed this way. It’s mentioned here just because some zypper command
line options allow one to overwrite system-wide defaults defined in
zypp.conf.
See also FILES section for more information.
1.Command line options
2.--config file
3.[/etc/zypp/zypp.conf] (system-wide
defaults for all libzypp based applications)
Increase verbosity. For debugging output
specify this option twice.
Suppress normal output. Brief (esp. result
notification) messages and error messages will still be printed, though. If
used together with conflicting --verbose option, the --verbose
option takes preference.
Whether to use colors in output if tty
supports it. For details see the [color] section in
zypper.conf.
Do not abbreviate text in tables. By default
zypper will try to abbreviate texts in some columns so that the table fits the
width of the screen. If you need to see the whole text, use this option.
Terse output for machine consumption. Implies
--no-abbrev and --no-color.
Choose among different predefined line drawing
character sets to use when drawing a table. The table style is identified by
an integer number. Style 0 is the default, styles 1-9 use
combinations of different box drawing characters whose shape may depend on the
font the terminal is using. Style 10 separates columns by a colon and
style 11 draws no lines at all.
Switches to non-interactive mode. In this mode
zypper doesn’t ask user to type answers to various prompts, but uses
default answers automatically. Those default answers also depend on other
options like --no-gpg-checks or --ignore-unknown.
In non-interactive mode do not skip patches
which have the rebootSuggested-flag set. Otherwise these patches are
considered to be interactive, like patches including a licenses or some
message to confirm. NOTE: This option does not turn on non-interactive
mode.
Switches to XML output. This option is useful
for scripts or graphical frontends using zypper.
Ignore unknown packages. This option is useful
for scripts, because when installing in --non-interactive mode zypper
expects each command line argument to match at least one known package.
Unknown names or globbing expressions with no match are treated as an error
unless this option is used.
Use the specified directory to look for the
repository definition ( .repo) files. The default value is
/etc/zypp/repos.d.
Use an alternative root directory for all
caches. The default value is /var/cache/zypp.
Use the specified directory for storing raw
copies of repository metadata files. The default value is
/var/cache/zypp/raw.
Use the specified directory to store the
repository metadata cache database files (solv files). The default value is
/var/cache/zypp/solv.
Use the specified directory for storing rpm
packages downloaded from repositories (see addrepo --keep-packages).
The default value is /var/cache/zypp/packages. + Packages are stored in
subdirectories named after the repositories alias and using the same path as
on the repositories medium.
User data is expected to be a simple string
without special chars or embedded newlines and may serve as transaction id. It
will be written to all install history log entries created throughout this
specific zypper call. It will also be passed on to zypp plugins executed
during commit. This will enable e.g. a btrfs plugin to tag created snapshots
with this string. For zypper itself this string has no special meaning.
Ignore GPG check failures and continue. If a
GPG issue occurs when using this option zypper prints and logs a warning and
automatically continues without interrupting the operation. Use this option
with caution, as you can easily overlook security problems by using it. (see
section GPG checks)
If new repository signing key is found, do not
ask what to do; trust and import it automatically. This option causes that the
new key is imported also in non-interactive mode, where it would otherwise got
rejected.
Use an additional repository for this
operation. The repository aliased tmp# and named by the specified URI will be
added for this operation and removed at the end. You can specify this option
multiple times.
Additionally use disabled repositories denoted
by tag for this operation. If tag matches a repositories
alias, name or URL, or is a keyword defined in the
repositories metadata, the repository will be temporarily enabled for this
operation. The repository will then be refreshed and used according to the
commands rules. You can specify this option multiple times.
If a disabled repositories metadata are not available in the local cache, they
will be downloaded to scan for matching keywords. Otherwise the keyword scan
will use the metadata available in the local cache. Only if used together with
the refresh command, a keyword scan will refresh all disabled
repositories.
To refresh all disabled repositories metadata:
To include a disabled repository repo-debug in a search:
To search only in a disabled repository repo-debug:
To enable all repos providing the debug keyword:
zypper --plus-content '' ref
zypper --plus-content repo-debug search
...
zypper --plus-content repo-debug search -r
repo-debug ...
zypper in --plus-content debug some
-debuginfo or -debugsource package
Do not read metadata from repositories. This
option will prevent loading of packages from repositories, thus making zypper
work only with the installed packages (if --disable-system-resolvables
was not specified).
Do not auto-refresh repositories (ignore the
auto-refresh setting). Useful to save time when doing operations like search,
if there is not a need to have a completely up to date metadata.
Ignore CD/DVD repositories. When this option
is specified, zypper acts as if the CD/DVD repositories were not defined at
all.
Ignore remote repositories like http, ftp, smb
and similar. This makes using zypper easier when being offline. When this
option is specified, zypper acts as if the remote repositories were not
defined at all.
For the current command set the value of the
$releasever repository variable to version. This can be used to
switch to new distribution repositories when performing a distribution
upgrade. See the dist-upgrade (dup) command and section
Repository Management for more details about using the
$releasever repository variable.
To check where you already use $releasever call:
zypper --releasever @--HERE--@ lr
-u
Operates on a different root directory. This
option influences the location of the repos.d directory and the metadata cache
directory and also causes rpm to be run with the --root option to do
the actual installation or removal of packages. See also the FILES
section.
Behaves like --root but shares the
repositories with the host system.
This option serves mainly for testing
purposes. It will cause zypper to act as if there were no packages installed
in the system. Use with caution as you can damage your system using this
option.
SUBCOMMANDS
Zypper subcommands are inspired by git(1). Subcommands are standalone executables that live in the zypper_execdir ( /usr/lib/zypper/commands). For subcommands zypper provides a wrapper that knows where the subcommands live, and runs them by passing command options and arguments to them. If a subcommand is not found in the zypper_execdir, the wrapper will look in the rest of your $PATH for it. Thus, it’s possible to write local zypper extensions that don’t live in system space.•The executable must be named
zypper- mytask.
•The executable must be located your
$PATH.
•A manpage for
zypper-mytask should be provided and explaining the commands
options and return values. It will be shown when calling zypper help
mytask.
•Zypper built-in commands take
precedence over subcommands with the same name.
•It’s fine to call zypper or use
libzypp from within your subcommand.
FILES
/etc/zypp/zypper.conf, $HOME/.zypper.confGlobal (system-wide) and user’s
configuration file for zypper. These files are read when zypper starts
up and --config option is not used.
User’s settings are preferred over global settings. Similarly, command
line options override the settings in either of these files. To sum it up, the
order of preference is as follows (from highest to lowest):
See the comments in /etc/zypp/zypper.conf for a list and description of
available options.
Note
The system-wide /etc/zypp/zypp.conf is mentioned here just because some
zypper command line options allow one to overwrite system-wide defaults
defined there. zypp.conf and zypper.conf have different content
and serve different purpose.
1.Command line options
2.$HOME/.zypper.conf
3./etc/zypp/zypper.conf
4.[/etc/zypp/zypp.conf] (system-wide
defaults for all libzypp based applications)
ZYpp configuration file affecting all libzypp
based applications. See the comments in the file for description of
configurable properties. Many locations of files and directories listed in
this section are configurable via zypp.conf. The location for this file itself
can be redefined only by setting $ZYPP_CONF in the environment.
File with package lock definitions, see
locks(5) manual page for details. The package lock commands (
addlock, removelock, etc.) can be used to manipulate this file.
This file is used by all ZYpp-based applications.
Directory containing repository definition
(*.repo) files. You can use the Repository Management commands to
manipulate these files, or you can edit them yourself. In either case, after
doing the modifications, executing *zypper refresh* is strongly recommended.
You can use the --reposd-dir global option to use an alternative
directory for this purpose or the --root option to make this directory
relative to the specified root directory.
This directory is used by all ZYpp-based applications.
Directory containing service definition
(*.service) files. You can use the Service Management Commands to
manipulate these files, or you can edit them yourself. Running *zypper refs*
is recommended after modifications have been done.
This directory is used by all ZYpp-based applications.
System directory containing zypper extensions
(see section SUBCOMMANDS)
Directory for storing raw metadata contained
in repositories. Use the --raw-cache-dir global option to use an
alternative directory for this purpose or the --root option to make
this directory relative to the specified root directory.
This directory is used by all ZYpp-based applications.
Directory containing preparsed metadata in
form of solv files.
This directory is used by all ZYpp-based applications.
If keeppackages property is set for a
repository (see the modifyrepo command), all the RPM file downloaded
during installation will be kept here. See also the clean command for
cleaning these cache directories.
This directory is used by all ZYpp-based applications.
Zypper log file. It should be attached to all
bugreports. (see also zypper-log(8)).
Solver testcase created by using the
--debug-solver option.
Solver testcase auto created when performing a
zypper dup.
Installation history log.
Command history for the zypper shell (see the
shell command).
File with a list of packages that will set the
reboot-needed flag when installed or upgraded.
Directory that can be used to define packages
that trigger the reboot-needed flag by adding additional files containing the
required package names.
EXIT CODES
There are several exit codes defined for zypper built-in commands for use e.g. within scripts. These codes are defined in header file src/zypper-main.h found in zypper source package. Codes below 100 denote an error, codes above 100 provide a specific information, 0 represents a normal successful run. Following is a list of these codes with descriptions:Successful run of zypper with no special
info.
Unexpected situation occurred, probably caused
by a bug.
zypper was invoked with an invalid command or
option, or a bad syntax.
Some of provided arguments were invalid. E.g.
an invalid URI was provided to the addrepo command.
A problem is reported by ZYPP library.
User invoking zypper has insufficient
privileges for specified operation.
No repositories are defined.
The ZYPP library is locked, e.g. packagekit is
running.
An error occurred during installation or
removal of packages. You may run zypper verify to repair any dependency
problems.
Returned by the patch-check command if there
are patches available for installation.
Returned by the patch-check command if there
are security patches available for installation.
Returned after a successful installation of a
patch which requires reboot of computer.
Returned after a successful installation of a
patch which requires restart of the package manager itself. This means that
one of patches to be installed affects the package manager itself and the
command used (e.g. zypper update) needs to be executed once again to
install any remaining patches.
Returned by the install and the
remove command in case any of the arguments does not match any of the
available (or installed) package names or other capabilities.
Returned upon exiting after receiving a SIGINT
or SIGTERM.
Some repository had to be disabled temporarily
because it failed to refresh. You should check your repository configuration
(e.g. zypper ref -f).
Installation basically succeeded, but some of
the packages %post install scripts returned an error. These packages were
successfully unpacked to disk and are registered in the rpm database, but due
to the failed install script they may not work as expected. The failed scripts
output might reveal what actually went wrong. Any scripts output is also
logged to /var/log/zypp/history.
HOMEPAGE
<https://github.com/openSUSE/zypper>AUTHORS
The zypper project was started by Martin Vidner, Jan Kupec, Michael Andres, Duncan Mac-Vicar Prett, Josef Reidinger and Stanislav Visnovsky. Many people have later contributed to it.SEE ALSO
locks(5), zypper-log(8), YaST2(8)2021-04-29 | SUSE Linux |