AllTechWiki



A Place for All Technical Stuff Linux Cloud etc

SUSE rpm Commands Vs Zypper Commands

 

SUSE rpm and zypper management commands for SUSE 12 and SUSE 15

These commands are used for package management tasks such as installing, updating, and removing software packages.

Task

RPM Command

Zypper Command

Install a Package

rpm -ivh package.rpm

zypper install package

Remove a Package

rpm -e package

zypper remove package

Upgrade a Package

rpm -Uvh package.rpm

zypper update package

Check for Updates

N/A

zypper list-updates

Update All Packages

rpm -Fvh *.rpm

zypper update

List Installed Packages

rpm -qa

zypper packages --installed-only

Search for a Package

rpm -q package

zypper search package

Display Package Info

rpm -qi package

zypper info package

List Files in a Package

rpm -ql package

zypper files package

Verify a Package

rpm -V package

zypper verify package

Add a Repository

N/A

zypper addrepo URL repo-name

Remove a Repository

N/A

zypper removerepo repo-name

Refresh Repositories

N/A

zypper refresh

Clean Local Cache

N/A

zypper clean

Key Points:

  • RPM: The rpm command is used for low-level package management tasks and works directly with RPM packages. It doesn't handle dependencies automatically.
  • Zypper: A higher-level package management tool that works with repositories, handles dependencies automatically, and provides a more comprehensive interface for managing software packages.

Both RPM and Zypper are available on SLES 12 and 15, and while RPM is useful for specific tasks, Zypper is generally recommended for most package management operations due to its ability to handle dependencies and work with repositories efficiently.



Post a Comment

Previous Post Next Post

Basic Useful Links