Open SuSe commands

Zypper
Zypper is the cli package manager of OpenSuSe and SuSe Linux.
Repository Management
#Add a new repository with the specified repo URL.
zypper addrepo [repo url alias]
#Used to rename a repository alias.
zypper renamerepo [repo alias] [new repo alias]
#Modify a repo by either enabling or disabling it.
zypper modifyrepo [repo alias]
#Remove a specified repo.
zypper removerepo [repo alias]
#Refresh the specified repository.
zypper refresh [repo alias]
#Refresh the specified repository.
zypper refresh [repo alias]
#Show the available repositories, including alias and source URI.
zypper repos
#Clean a specified repository.
zypper clean [repo alias]
#Export the specified repository from a set source to destination.
zypper repos -e [repo-name][destination]
#Import a repository from specified source.
zypper repos -ar [repo-name] [src]
Service Management
#Show the repository’s defined services.
zypper services
#Add a service with the specified name.
zypper addservice [service-name]
#Modify the specified service.
zypper modifyservice [service-name]
#Refresh all the available services.
zypper refresh service
#Remove the specified service.
zypper removeservice [service name]
Package Installation
#Install latest version of the specified package.
zypper install [package]
#Simulate the installation of the specific package.
zypper install -D [package]
#Install latest version of the specified package from a custom repository.
zypper install -r [repo] [package]
#Automatically agree to all non-free licenses when installing a specific package.
zypper install -l [package]
#Install latest version of the specified package but do not install any optional packages.
zypper install –no-recommends [package]
#Install latest version of any optional packages for the specified package.
zypper install-new-recommends [package]
#Install an older version of the specified package.
zypper install –oldpackage [package]
Package Removal
#Remove the installed version of the specified package.
zypper remove [package]
#Simulate the removal of a specific package.
zypper remove -D [package]
#Remove the installed version of the specified package as well as any unused dependencies.
zypper remove -u [package]
#Remove the installed version of the specified package but do not remove any unused dependencies.
zypper remove -U [package]
#Remove any packages that provide a particular system feature.
zypper remove -C [feature]
#Remove any packages if it matches the current query.
zypper remove -n [package]
Package Verification
#Verify the integrity of package dependencies. Useful when you have broken packages.
zypper verify
#Verify the integrity of package dependencies but do not modify and install any additional packages in the system.
zypper verify –no-recommends
Source Package Management
#Install source packages and build dependencies.
zypper source-install
#Install source packages without any build dependencies.
zypper source-install -D
#Install build dependencies for a particular source package.
zypper source-install -d
#Download both the source file and its dependencies to your machine.
zypper source-install –download-only
Package Updates
#Update the specified packages.
zypper update
#Automatically agree to all non-free software licenses while updating the system.
zypper update -l
#Update the current system using packages from a custom repository.
zypper update -r [repo]
#Update the current system and omit any package update that requires any user intervention.
zypper update –skip-interactive
#Update the current system and forcefully update any packages that require user intervention.
zypper update –with-interactive
#Update the current system and skip potential file conflicts by allowing Zypper to overwrite existing packages.
zypper update –replacefiles
#Simulate a full system update.
zypper update -D
Package Patching
#List all the available patches for all the currently installed packages.
zypper list-patches
#List all the available Bugzilla patches for all currently installed packages.
zypper list-patches -b
#List all the available MITRE’s CVE patches for all currently installed packages.
zypper list-patches –cve
#List all the applicable patches for the system.
zypper patch-check
#Install the applicable patches for the system.
zypper patch
#Install a specific Bugzilla patch for the system.
zypper patch -b [patch number]
#Install a specific CVE patch for the system.
zypper patch –cve [patch number]
Package Information and Search
#Search for a package.
zypper search [package-name]
#Do an exact word search on the current query.
zypper search –match-exact [package name]
#Search for all the packages that requires the current query as part of their dependency list.
zypper search –requires [package name]
#Search for all the packages that the current query includes as its optional dependencies.
zypper search –recommends [package name]
#Search for all the packages that conflicts with the current query.
zypper search –conflicts [package name]
#Display detailed information about the specified package.
zypper info [package]
Package Locks
#List currently active package locks.
zypper locks
#Add a package lock.
zypper addlock [package name]
#Remove specified package lock.
zypper removelock [package name]
Distribution Upgrade
#Perform a distribution upgrade for all installed packages. It is best to restrict upgrade from a specific source repo.
zypper dist-upgrade
#Simulate a distribution upgrade for all installed packages.
zypper dist-upgrade -D
Shell session
#Starts a shell session.
zypper shell

RPM
The RPM Package Manager (RPM) is a powerful command line driven package management system capable of installing, uninstalling, verifying, querying, and updating computer software packages. Each software package consists of an archive of files along with information about the package like its version, a description, and the like.
#Install a package.
rpm -ivh [rpm-file]
#Update a package.
rpm -Uv [rpm-file]
#Remove a package.
rpm -e [package]
#Remove a package, but not its dependencies.
rpm -e --nodeps [package]
#Find what package installs a file.
rpm -qf [rpm-file]
#Find what files are installed by a package.
rpm -ql [package]
rpm -qpl [rpm-file]
#Find what packages require a package or file.
rpm -q --whatrequires [package]
rpm -q --whatrequires [rpm-file]
#List all installed packages.
rpm -qa
#Find a packages's dependencies.
rpm -i --test [package]
#Display checksum against a source.
rpm -K [package]
#Verify a package.
rpm -V [package]
Yast
YaST is the installation and configuration tool for openSUSE and the SUSE Linux Enterprise distributions. It features an easy-to-use interface and powerful configuration capabilities.
#Run YaST using Qt GUI.
yast --qt
#Run YaST using Gtk GUI.
yast --gtk
#Run YaST in text-mode.
yast --ncurses
#List available YaST modules.
yast -l
#Use modules.
yast [modulename]
#Install a Package with YaST.
yast -i [rpm-file]
#Remove an Installed Package with YaST.
yast --remove [rpm-file]
Yast GUI:
