← 返回命令列表

Linux command

zypper 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Synchronize

sudo zypper refresh

Install

sudo zypper install [package]

Remove

sudo zypper remove [package]

Upgrade

sudo zypper update

Search

zypper search [keyword]

Show

zypper repos --sort-by-priority

说明

zypper is the command-line package management utility for SUSE and openSUSE Linux. It provides complete package management including installation, removal, updates, and repository management. Zypper supports dependency resolution, patch management, and can handle distribution upgrades. It uses the libzypp library and is the CLI frontend for YaST software management.

参数

ref, refresh
Refresh all repositories
in, install _package_
Install packages
rm, remove _package_
Remove packages
up, update
Update installed packages
se, search _pattern_
Search for packages
lr, repos
List all configured repositories
dup, dist-upgrade
Perform distribution upgrade
--no-confirm
Don't ask for confirmation
--sort-by-priority
Sort repository list by priority

FAQ

What is the zypper command used for?

zypper is the command-line package management utility for SUSE and openSUSE Linux. It provides complete package management including installation, removal, updates, and repository management. Zypper supports dependency resolution, patch management, and can handle distribution upgrades. It uses the libzypp library and is the CLI frontend for YaST software management.

How do I run a basic zypper example?

Run `sudo zypper refresh` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does ref, refresh do in zypper?

Refresh all repositories