zypper Cheatsheet
#
zypper is a command-line package management tool used on openSUSE and SUSE Linux Enterprise systems. It helps in installing, updating, and removing software packages.
Basic Commands
#
Command/Option | Example | Description |
---|
zypper install | zypper install <package> | Install a package |
zypper remove | zypper remove <package> | Remove a package |
zypper update | zypper update | Update all installed packages |
zypper upgrade | zypper upgrade | Upgrade all installed packages |
zypper info | zypper info <package> | Show information about a package |
Package Management
#
Command/Option | Example | Description |
---|
zypper search | zypper search <package> | Search for a package |
zypper info -i | zypper info -i <package> | Show detailed information about a package |
zypper patterns | zypper patterns | List all available patterns |
zypper install --oldpackage | zypper install --oldpackage <package> | Install an older version of a package |
Repository Management
#
Command/Option | Example | Description |
---|
zypper ar | zypper ar <repo_url> <repo_alias> | Add a new repository |
zypper rr | zypper rr <repo_alias> | Remove a repository |
zypper ref | zypper ref | Refresh repository information |
zypper repos | zypper repos | List all repositories |
Configuration
#
Command/Option | Example | Description |
---|
zypper clean | zypper clean | Clean up cached data |
zypper dist-upgrade | zypper dist-upgrade | Upgrade the system to a new distribution |
zypper dup | zypper dup | Perform a distribution upgrade |
Advanced Commands
#
Command/Option | Example | Description |
---|
zypper lock | zypper lock <package> | Lock a package to prevent updates |
zypper unlock | zypper unlock <package> | Unlock a package to allow updates |
zypper lp | zypper lp | List all locked packages |
This cheatsheet provides essential zypper
commands for package management on openSUSE and SUSE Linux Enterprise systems.