Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use SUSE Linux's Zypper package manager

Shulou Source: shulou.com Published: 2022-06-01 07:26:30 10月20日 Update

How to use SUSE Linux's Zypper package manager? I believe many inexperienced people don't know what to do about it. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Zypper is used in SuSE Linux to install, update, delete software, manage repositories, and perform various query operations. In this article, we will discuss different examples of the zypper command.

Syntax:

# zypper [--global-opts] [--command-opts] [command-arguments]

System version

OpenSUSE leap 15.2

Example 1: lists the available global options and commands.

Enter the zypper command, which displays all global options and commands that are available in zypper.

A3f8298a0fe2:/ # zypper

Example 2: get help from the zypper subcommand

Syntax: zypper help [subcommand]

A3f8298a0fe2:/ # zypper help remove

Example 3: list warehouses

A3f8298a0fe2:/ # zypper repos or a3f8298a0fe2:/ # zypper lr

Example 4: refresh the warehouse database

Syntax: zypper refresh or zypper ref

A3f8298a0fe2:/ # zypper ref

Example 5: install software

Syntax: zypper install or zypper in

A3f8298a0fe2:/ # zypper in-y vim

Example 6: delete software

Syntax: zypper remove or zypper rm

A3f8298a0fe2:/ # zypper rm-y vim

Example 7: update the software package

Syntax: zypper update or zypper up

A3f8298a0fe2:/ # zypper update-y zypper

Example 8: search for installation packages

Syntax: zypper search or zypper se

A3f8298a0fe2:/ # zypper se gnome-desktop

Example 9: view the details of the installation package

Syntax: zypper info or zypper if

A3f8298a0fe2:/ # zypper info apache2

Example 10: clear zypper cache

If you only want to clean up the zypper cache, you can use the following command:

A3f8298a0fe2:/ # zypper clean All repositories have been cleaned up.

If you want to clear the metadata and package cache immediately, use the zypper clean-an option:

A3f8298a0fe2:/ # zypper clean-an All repositories have been cleaned up. After reading the above, have you mastered how to use SUSE Linux's Zypper package manager? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Instance syntax command method software management cache usage repository global content data more problem update difference clarity helplessness to this end information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple macOS MySQL Xiaomi Huawei