You need
Always refresh metadata to ensure you get the latest package versions.
sudo privileges to run Zypper commands that modify the system.Always refresh metadata to ensure you get the latest package versions.
Refreshing Package Metadata
Before you search or install packages, update metadata from all enabled repositories:Searching for Packages
Use these (search) command to find packages by name or keyword:
Listing Installed Packages
To list all installed packages:firefox) is installed:
Installing Packages
From Repositories
Install a package from enabled repositories with thein (install) command:
From a Local RPM
To install an RPM file stored on your machine:Removing Packages
Use therm (remove) command to uninstall a package and any packages that depend on it:
Removing packages may also uninstall dependencies required by other applications. Double-check the list before confirming.
Managing Software Repositories
Listing Repositories
Display all configured repositories and their status:Enabling, Disabling, and Auto-Refresh
| Command | Description |
|---|---|
zypper modifyrepo -d <repo-alias> | Disable a repository |
zypper modifyrepo -e <repo-alias> | Enable a repository |
zypper modifyrepo -f <repo-alias> | Enable auto-refresh for a repo |
zypper modifyrepo -F <repo-alias> | Disable auto-refresh for a repo |
Adding and Removing Repositories
-
Add a new repository:
Sample output:
-
Remove a repository:
Sample output: