Blog

03/06/2019

Linux: Update All Packages Command



How do I update all installed packages on Linux operating systems? How do I perform upgrading packages through a network on Linux operating systems?

Linux has various commands to update all installed packages. Please note that system and package updates should be performed with care. It is very important to have up to date backup before you do this. The exact command depends upon your Linux distribution:

[donotprint][/donotprint]

  1. Debian / Ubuntu / Mint Linux and friends try apt-get command.
  2. CentOS / RHEL / Red Hat / Fedora Linux and friends try yum command.
  3. Suse / OpenSUSE Linux use zypper command or graphical tool called YaST online update.
  4. Slackware Linux user try slackpkg command.
  5. Arch Linux user try pacman command.
  6. Gentoo Linux user try emerge command.

apt-get command example to update all packages on the Debian or Ubuntu Linux

$ sudo apt-get update
$ sudo apt-get upgrade

See apt-get command tutorial for more information.

yum command example to update all packages on the RHEL/CentOS/Red Hat/Fedora Linux

# yum update
See yum command tutorial for more information.

zypper command example to update all packages on the OpenSUSE/Suse Linux

# zypper refresh
# zypper update

See zypper Opensuse command tutorial or Novell SUSE Linux tutorial to update all package for more info.

pacman command example to update all packages on the Arch Linux

# pacman -Syu
OR
# pacman --sync --refresh --sysupgrade
See pacman package manager documentation for more information.

emerge command example to update all packages on the Gentoo Linux

# emerge --sync
# emerge --update --deep --with-bdeps=y @world

See emerge package manager documentation for more information.

Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

14/08/2019

How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...
14/08/2019

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....
12/08/2019

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...