How to update OpenSUSE Linux software and kernel using CLI

I am a new OpenSUSE Linux server user. How do I upgrade and update OpenSUSE Linux software and kernel from the CLI? How do I use the command line tool to upgrade your system to the latest version of openSUSE software and kernel?

Introduction : You can use zypper or yast2 command for managing and updating installed software including Linux kernel on OpenSUSE Linux. This page demonstrates how to run a zypper command to upgrade OpenSUSE Linux system.

How do I update OpenSUSE Linux software and kernel from command line?

  1. Open the terminal application.
  2. Log in to the server using the ssh command as follows
    ssh user@server-ip
  3. Refresh OpenSUSE repository from the Internet, execute:
    sudo zypper refresh
  4. Upgrade OpenSUSE Linux, type:
    sudo zypper update

Let us see all commands in details for your OpenSUSE Linux box.

What is a zypper command in OpenSUSE?

zypper is nothing but a command line package manager. It is equivalent to apt command/apt-get command on Debian/Ubuntu or yum command/NA command on a CentOS/RHEL/Fedora. One can use the zypper command to:

  • Install new packages
  • Delete or remove software
  • Update Linux kernel on OpenSUSE
  • Update all installed packages with newer available version and more
  • Apply patches and more

How to update OpenSUSE system to the latest packages

First, Verify that repos are enabled, run:
$ zypper repos --uri

Repository priorities are without effect. All enabled repositories share the same priority.
# | Alias                             | Name                              | Enabled | GPG Check | Refresh | URI                                                          
1 | openSUSE-Leap-15.0-1              | openSUSE-Leap-15.0-1              | Yes     | (r ) Yes  | Yes     |
2 | openSUSE-Leap-15.0-Update         | openSUSE-Leap-15.0-Update         | Yes     | (r ) Yes  | Yes     |           
3 | openSUSE-Leap-15.0-Update-Non-Oss | openSUSE-Leap-15.0-Update-Non-Oss | Yes     | (r ) Yes  | Yes     |

How to refresh OpenSUSE Linux repositories

Type any one of the following command:
sudo zypper refresh
sudo zypper ref

How to list all applicable patches for OpenSUSE

Again use any one of the following option:
sudo zypper list-patches
sudo zypper lp

OpenSUSE Linux show or list all applicable patches (click to enlarge)

How to list all available updates on OpenSUSE Linux

Run any one of the following
sudo zypper list-updates
sudo zypper lu

OpenSUSE Linux show or list all available updates (click to enlarge)

How to upgrade OpenSUSE system to the latest packages and kernel

Execute the following command:
sudo zypper update
sudo zypper up

At the end you will see message as follows:

There are some running programs that might use files deleted by recent upgrade. You may wish to check and restart some of them. Run ‘zypper ps -s’ to list these programs.

You can view outdated process by running the following command:
$ zypper ps -s
Restart outdated process one by one using the systemctl command:
$ sudo systemctl restart sshd
Or simply reboot the Linux system by running:
$ sudo reboot
$ sudo shutdown -r now

Restart outdated OpenSUSE Linux process

A note about YaST/YaST2 online update command line tool

YaST is universal configuration utility and comes with both GUI and TUI. Just run the following command to apply severe security updates:
$ sudo yast2 online_update

YaST online update via TUI (Text User Interface) tool in action


This page explained how to install updates on openSUSE Linux to keep your system secure. For more info see this page or type the following man command to read more about zypper tool:
man zypper

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Emilia Jan 2, 2019 @ 6:22

    Nice. I just updated my VM as root user:
    zypper ref && zypper up
    This is the best site for Linux developers.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @