Skip to content
ImagineWorld

Software Management with Zypper

node_idnode-book_suse-certified-administrator_chapter-06-software-management-with-zypper
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num6
chapter_titleSoftware Management with Zypper
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 6 — Software Management with Zypper

Section titled “Chapter 6 — Software Management with Zypper”

In SUSE Linux Enterprise Server, software installation, updates, patches, and repository management are handled primarily using zypper, SUSE’s command-line package manager. Software management is a core responsibility of a Linux administrator because it directly affects system stability, security, compatibility, and uptime.

This chapter covers:

  • Understanding software repositories
  • Installing and removing packages
  • Applying patches and security updates
  • Using rollback and Snapper snapshots
  • Transactional updates for consistent system state

By the end of this chapter, you will be able to manage system updates safely and troubleshoot package issues with confidence.

Software in SUSE is delivered through repositories (repos). These are structured collections of packages stored on SUSE servers or internal mirrors.

View repository list:

Terminal window
zypper lr

Common columns:

  • Alias (short name)
  • Name (descriptive name)
  • Enabled (yes or no)
  • GPG Check (security verification)
  • URI (source location)

Refresh repository metadata:

Terminal window
zypper refresh

This ensures the latest package lists are available.

Add a repository:

Terminal window
sudo zypper ar <URL> <repo_name>

Remove a repository:

Terminal window
sudo zypper rr <repo_name>

Enable or disable:

Terminal window
sudo zypper mr -e repo_name
sudo zypper mr -d repo_name

Repository management is essential for controlling:

  • Security patch access
  • Software compatibility
  • Version consistency across systems

Enterprises often use SUSE Manager for centralized repo control, covered later in the book.

Search for a package:

Terminal window
zypper search package_name

Install a package:

Terminal window
sudo zypper install package_name

Remove a package:

Terminal window
sudo zypper remove package_name

Install multiple packages at once:

Terminal window
sudo zypper install vim git curl

List installed packages:

Terminal window
zypper pa --installed-only

Update all packages:

Terminal window
sudo zypper update

Apply only security updates:

Terminal window
sudo zypper patch

View available patches:

Terminal window
zypper lp

View installed patches:

Terminal window
zypper patches

Security patching is one of the most important roles of a Linux admin.

SUSE uses Btrfs snapshots and Snapper to create automatic restore points during updates.

View snapshots:

Terminal window
sudo snapper list

Rollback to a previous snapshot:

Terminal window
sudo snapper rollback <snapshot_number>

Then reboot:

Terminal window
sudo reboot

This feature allows safe experimentation and prevents system downtime during failed updates.

Some SUSE editions support transactional updates, which apply updates atomically (as a single unit). This ensures:

  • No partial updates
  • Easy rollback
  • Stable system state even if power or network fails during update

Check if system supports transactional updates:

Terminal window
transactional-update --help

Apply updates transactionally:

Terminal window
sudo transactional-update dup

Reboot for changes to take effect:

Terminal window
sudo reboot

Enterprises using critical workloads rely heavily on transactional safety.


A healthcare provider updated a server running an application critical to patient scheduling. After the update, the application failed due to library version conflicts.

Because the server was running Btrfs:

  • Administrator simply ran:
Terminal window
sudo snapper rollback <snapshot_id>
sudo reboot
  • System returned to full working state instantly.

No reinstallation. No downtime. No emergency debugging.

This capability is one of SUSE’s strongest advantages in enterprise environments.

Remember the update cycle:

Refresh → Patch → Update → Snapshot rollback if needed

In commands:

Terminal window
zypper refresh
zypper patch
zypper update
snapper list
snapper rollback ID

This ensures controlled, safe change management.


  1. View your repository list:
Terminal window
zypper lr
  1. Refresh repositories:
Terminal window
sudo zypper refresh
  1. Search for the htop package:
Terminal window
zypper search htop
  1. Install it:
Terminal window
sudo zypper install htop
  1. Run it briefly to check system activity:
Terminal window
htop
  1. Remove the package:
Terminal window
sudo zypper remove htop
  1. Create a system snapshot manually:
Terminal window
sudo snapper create -d "Before test updates"

Document:

  • What changed
  • What output you observed
  1. Why is patching critical even if a system appears to be running fine?
  2. How can transactional updates reduce risk during production maintenance?
  3. Why is it important to refresh repositories before installing or updating software?
  4. When would you prefer rollback to troubleshooting?

Discussing these strengthens operational awareness.

In this chapter, you learned:

  • How to manage repositories and verify their configuration
  • How to install, remove, and search software using zypper
  • How to apply security patches and system updates safely
  • How to use Snapper snapshots to rollback failed system states
  • How transactional updates support high-reliability environments

With these skills, you can confidently maintain secure and stable SUSE systems.