Anda di halaman 1dari 6

zypper(8)

System Tools

zypper(8)

SYNTAX
zypper [--global-options] [command] [--command-options] [command-arguments]
zypper --help
DESCRIPTION
zypper is a command-line interface to ZYPP system management library.
It can be used to install, update, remove software, manage installation
sources, perform various searches, and more.
zypper is designed to be compatible with rug, which is a command-line
interface to the ZENworks Linux Management (ZLM) agent. Compared to
rug, zypper does not need the ZLM daemon to run, and is intented to
provide more and improved functionality.
COMMANDS
zypper provides a number of commands. Each command accepts the option
flags listed in the GLOBAL OPTIONS section. In addition, many commands
have specific option flags, which are listed in this section.
General Commands
shell (sh)
Starts a shell for entering multiple commands in one session.
(NEW, beware of bugs!)
Package Management Commands
zypper works with several types of resource objects, called resolvables. A resolvable is a package, patch, pattern, language, or a product.
package - all RPM packages including patch and delta packages
patch - update of the packages, it can include special scripts and messages
pattern - group of packages
language - group of packages with language support
product - group of packages, which are necessary to install a product

info (if) [name] ...


Displays full info for the specified packages.
install (in) [name] ...
Install resolvables.
-c, --catalog
Only from this catalog (FIXME not implemented yet)

-t, --type [resolvable]


Type of resolvable (default: package)
-y, --no-confirm
Don't require user confirmation.
list-updates (lu)
List available updates.
-t, --type
Type of resolvable (default: patch)
See also the NOTE at update.
remove (rm) [name]..
Remove resolvables.
-t, --type [resolvable]
Type of resolvable (default: package)
-y, --no-confirm
Don't require user confirmation.
update (up)
Update resolvables.
-t, --type [resolvable]
Type of resolvable (default: patch)
-y, --no-confirm
Don't require user confirmation.
--skip-interactive
This will skip interactive patches, that is those that need a
reboot, contain a message, or update a package whose license
needs to be confirmed.
NOTE: Zypper prefers to update only those packages for which a
patch description exists, like on the SUSE update servers. To
operate on all packages for which there is a better version
instead, select --type package which is also the default in rug
compatibility mode.
search (se) [options] [querystring] ...
Search for resolvables matching given strings. * (any substring)
and ? (any character) wildcards can also be used within search
strings.
Results of search are printed in a
S (status), Catalog, Type (type of
Arch (architecture). Status column
i - installed, v - another version
for neither of the former cases.

table with following columns:


resolvable), Name, Version,
can contain following values:
installed, or an empty space

In rug compatibility mode the --type option defaults to package.

Furthermore, Instead of the Type column, rug's Bundle column is


printed, however, with no contents.
This command accepts the following options:
--match-all
Search for a match to all search strings (default).
--match-any
Search for a match to any of the search strings.
--match-substrings
Matches for search strings may be partial words (default).
--match-words
Matches for search strings may only be whole words.
--match-exact
Searches for an exact name of the resolvable.
-d, --search-descriptions
Search also in summaries and descriptions.
-i, --installed-only
Show only resolvables that are already installed.
-u, --uninstalled-only
Show only resolvables that are not currently installed.
-t, --type [resolvable]
Search only for resolvables of specified type.
-c, --catalog
Show only the resolvables from the catalog you specify. (not
implemented yet)
--sort-by-name
Sort resolvables by name (default).
--sort-by-catalog
Sort resolvables by catalog, not by name.
Patch Management
patch-check (pchk)
Check for patches. Displays a count of applicable patches and
how many of them have the security category.
Exit status: 0 - no patches, 1 - non-security patches, 2 - security patches.
patches (pch)
List patches. Lists all patches that are available, including
installed and not applicable ones.

patch-info [name] ...


Displays full info for the specified patches.
Installation Source Management
zypper is able to work with YaST installation sources, aptrpm repositories, ZENworks 7 Linux Management, ZENworks 6.6.x Linux Management
servers, as well as local files. Currently, an Installation Source in
zypper is a synonym for both Service and Catalog in ZLM.
TERMS: ZENworks distinguishes services and catalogs. A service is added
by URI and contains one or more catalogs. Libzypp does not have this
distinction (yet) but for compatibility it uses the same command and
option names (service-add, --catalog) as rug. In libzypp, an installation source is a repository is a service is a catalog.
service-add (sa) <URI> [alias]
Add a new service (installation source).
-r, --repo <FILE.repo>
Read URI and alias from a file
-t, --type <TYPE>
Type of repository (YaST, YUM, or Plaindir).
-d, --disabled
Add the service as disabled.
-n, --no-refresh
Do not automatically refresh the metadata.
service-delete (sd) <URI|alias|number>
Delete a service (installation source).
service-list (sl)
List services (installation sources).
Following data are printed for each source found: Enabled
(whether the source is enabled), Refresh (whether autorefresh is
enabled for the source), Type (YaST, YUM, ...), Name, and URI.
rug compatibility mode: if -r global option is set, zypper
doesn't include 'Enabled' and 'Refresh' columns and prints rug's
'Status' column with values "Active" or "Disabled" instead.
service-rename (sr) <URI|alias|number> <new-alias>
Rename a service (installation source).
refresh (ref)
Refresh all installation sources found in system.
This means downloading resolvables' metadata from source media
and
storing
it
in
local cache, typically under

/var/lib/zypp/cache.
GLOBAL OPTIONS
-h, --help
Help. If a command is specified together with --help option,
command specific help is displayed.
-V, --version
Print zypper version number and exit.
-v, --verbose
Increase verbosity. For debugging output specify this option
twice.
-t, --terse
Terse output for machine consumption.
-s, --table-style
Specifies table style to use. Table style is identified by an
integer number. TODO
-r, --rug-compatible
Turns on rug compatibility. See compatibility notes next to
affected commands.
FILES
/var/lib/zypp/cache
Directory for storing metadata contained
sources.

in

installation

EXIT CODES
There are several exit codes defined for zypper for use e.g. within
scripts. These codes are defined in header file src/zmart.h found in
zypper source package. Codes from interval (1-5) denote an error, numbers (100-103) provide a specific information, 0 represents a normal
successfull run. Following is a list of these codes with descriptions.
0 - ZYPPER_EXIT_OK
Successfull run of zypper with no special info.
1 - ZYPPER_EXIT_ERR_BUG
Unexpected situation occured, probably caused by a bug.
2 - ZYPPER_EXIT_ERR_SYNTAX
zypper was invoked with an invalid command or option, or a bad
syntax.
3 - ZYPPER_EXIT_ERR_INVALID_ARGS
Some of provided arguments were invalid. E.g. an invalid URI was
provided to the service-add command.
4 - ZYPPER_EXIT_ERR_ZYPP
A problem reported by ZYPP library. E.g. another instance of
ZYPP is running.
5 - ZYPPER_EXIT_ERR_PRIVILEGES
User invoking zypper has insufficient privileges for specified

operation.
100 - ZYPPER_EXIT_INF_UPDATE_NEEDED
Returned by the patch-check command if there are patches available for installation.
101 - ZYPPER_EXIT_INF_SEC_UPDATE_NEEDED
Returned by the patch-check command if there are security
patches available for installation.
102 - ZYPPER_EXIT_INF_REBOOT_NEEDED
Returned after a successfull installation of a patch which
requires reboot of computer.
103 - ZYPPER_EXIT_INF_RESTART_NEEDED
Returned after a successfull 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.

Anda mungkin juga menyukai