[Solved] Error while update && upgrade

i have freshly installed Rocky 8.5 onto my pc, and while performing dnf update -y && dnf upgrade -y i was facing this erros.

please help me out.

Many Thanks.

[username@device-name ~]$ su -
Password: 
[root@device-name ~]# dnf update -y && dnf upgrade -y
Last metadata expiration check: 0:39:58 ago on Thu 09 Dec 2021 09:33:18 AM IST.
Error: 
 Problem: package libreport-2.9.5-15.el8.rocky.2.x86_64 requires libreport-filesystem = 2.9.5-15.el8.rocky.2, but none of the providers can be installed
  - cannot install both libreport-filesystem-2.9.5-15.el8.rocky.4.x86_64 and libreport-filesystem-2.9.5-15.el8.rocky.2.x86_64
  - cannot install the best update candidate for package libreport-filesystem-2.9.5-15.el8.rocky.2.x86_64
  - cannot install the best update candidate for package libreport-2.9.5-15.el8.rocky.2.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@device-name ~]# neofetch
        #####           root@device-name 
       #######          ---------------- 
       ##O#O##          OS: Rocky Linux 8.5 (Green Obsidian) x86_64 
       #######          Host: H81M-S 
     ###########        Kernel: 4.18.0-348.2.1.el8_5.x86_64 
    #############       Uptime: 58 mins 
   ###############      Packages: 1421 (rpm) 
   ################     Shell: bash 4.4.20 
  #################     Resolution: 1366x768 
#####################   WM: Mutter 
#####################   WM Theme: Adwaita 
  #################     Theme: Adwaita [GTK2/3] 
                        Icons: Adwaita [GTK2/3] 
                        Terminal: gnome-terminal 
                        CPU: Intel Pentium G3240 (2) @ 3.100GHz 
                        GPU: Intel HD Graphics 
                        Memory: 2214MiB / 3637MiB 

                                                
                                                


[root@device-name ~]# 


solution: i remove libreport* with dnf autoremove libreport* -y, now i can update and upgrade, i hope i didnt break any system files.

Note that “update” is an alias for “upgrade”. See man dnf
Therefore, you did run dnf upgrade -y && dnf upgrade -y

Why twice? If the first failed, then second won’t run and if the first did succeed, then second had nothing to do.

Furthermore, why say “yes” automatically? You can say it interactively too, when the proposed changes are shown to you.

1 Like

A debianism? Note that in debian the semantics are different, update downloads metadata, upgrade updates (sic!) packages.

1 Like

yes sir, i have moved from ubuntu to rocky linux as opposed to fedora or cent os.

As already pointed out, but bears repeating, I recommend that you do not use the -y switch. When you use -y you are removing your only chance to bail out of the dnf command if it looks like it will do something you weren’t expecting. without -y you will get a summary of what the dnf command will do and a chance to proceed or bail.