• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Use distro-sync Option With dnf To Upgrade OS (CentOS/RHEL 8)

by admin

dnf has a distro-sync option which is used to synchronize installed packages to the latest available versions. It does the necessary upgrades, downgrades or keeps selected installed packages to match the latest version available from any enabled repository. If no package is given, all installed packages are considered.

The distro-sync option of DNF is similar to yum’s update option. The following is an example of the distro-sync option:

# dnf distro-sync
Last metadata expiration check: 0:00:38 ago on Thu 05 Sep 2019 05:44:31 AM UTC.
Dependencies resolved.
========================================================================================================================================================================
 Package                         Arch                             Version                                    Repository                                            Size
========================================================================================================================================================================
Upgrading:
 pango                           x86_64                           1.42.4-5.el8_0                             rhel-8-appstream-rhui-rpms                           297 k
 libgs                           x86_64                           9.25-2.el8_0.3                             rhel-8-appstream-rhui-rpms                           3.1 M

Transaction Summary
========================================================================================================================================================================
Upgrade  2 Packages

Total download size: 3.3 M
Is this ok [y/N]: N
Operation aborted.

This command shows the same behaviour as yum update, and both can be used to upgrade all packages on the system:

# yum update
Last metadata expiration check: 0:01:16 ago on Thu 05 Sep 2019 05:44:31 AM UTC.
Dependencies resolved.
========================================================================================================================================================================
 Package                         Arch                             Version                                    Repository                                            Size
========================================================================================================================================================================
Upgrading:
 pango                           x86_64                           1.42.4-5.el8_0                             rhel-8-appstream-rhui-rpms                           297 k
 libgs                           x86_64                           9.25-2.el8_0.3                             rhel-8-appstream-rhui-rpms                           3.1 M

Transaction Summary
========================================================================================================================================================================
Upgrade  2 Packages

Total download size: 3.3 M
Is this ok [y/N]: N
Operation aborted.

Filed Under: CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. CIFS Share Filesystem Is Not Mounted after Reboot on CentOS/RHEL 7
  2. How to create and mount filesystems in Linux
  3. Common Init.ora Parameters and Unix, Linux Kernel Parameters and Relationship Between Them
  4. CentOS / RHEL 4 : How to install and configure FTP server (vsftpd)
  5. How to clean YUM cache in CentOS / RHEL
  6. How to persistently set nr_requests using UDEV rules
  7. How to move /usr and /var to Another Partition or Disk
  8. CentOS / RHEL : How to configure a user account to never expire (disable password ageing)
  9. How to disable NetworkManager on CentOS / RHEL 7
  10. How to use command line shell functions in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright