rh124_dnf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rh124_dnf [2026/10/22 20:58] – [Examine current repositories] rpjdayrh124_dnf [2026/10/29 14:56] (current) – [Working with local .rpm files] rpjday
Line 3: Line 3:
 ===== TO ADD ===== ===== TO ADD =====
  
-  * dnf config files /etc/dnf/dnf.conf 
   * plugins   * plugins
 +  * excluding packages
 +
 +===== Contents of dnf package =====
 +
 +<code>
 +$ rpm -ql dnf | less
 +</code>
  
 ===== /etc/dnf and dnf.conf ===== ===== /etc/dnf and dnf.conf =====
Line 44: Line 50:
 </code> </code>
  
 +For help with DNF configuration:
 +
 +<code>
 +$ man dnf.conf
 +</code>
 ===== Upcoming commands ===== ===== Upcoming commands =====
  
Line 282: Line 293:
  
 ==== Find package that contains a given file ==== ==== Find package that contains a given file ====
 +
 +If you know the full path to the file:
  
 <code> <code>
Line 293: Line 306:
 Matched from: Matched from:
 Filename    : /usr/bin/strace Filename    : /usr/bin/strace
 +</code>
 +
 +If you're not sure of the full path to the file, use a wildcard:
 +
 +<code>
 +$ dnf provides */strace
 </code> </code>
  
Line 301: Line 320:
 $ rpm -q strace $ rpm -q strace
 $ sudo dnf remove strace $ sudo dnf remove strace
 +</code>
 +
 +===== Checking for/installing upgrades =====
 +
 +Check for potential upgrades with either of:
 +
 +<code>
 +$ dnf check-update
 +$ dnf list --upgrades
 +</code>
 +
 +Variations for upgrading:
 +
 +<code>
 +$ dnf upgrade --refresh        # upgrade metadata first
 +$ dnf upgrade
 +$ dnf upgrade <package list>
 </code> </code>
  
Line 395: Line 431:
 </code> </code>
  
-You can guess the rest.+You can guess the rest. As an example:
  
-===== Installing local .rpm files =====+<code> 
 +$ sudo dnf group install "Virtualization Host" 
 + 
 +... snip ... 
 + 
 +Installing Environment Groups: 
 + Virtualization Host                                                                            
 +Installing Groups: 
 + Base                                                                                           
 + Core                                                                                           
 + Standard                                                                                       
 + Virtualization Hypervisor                                                                      
 + Virtualization Tools                                                                           
 + 
 +Transaction Summary 
 +================================================================================================ 
 +Install  434 Packages 
 +Upgrade   69 Packages 
 + 
 +Total download size: 656 M 
 +</code> 
 + 
 +Upgrade a group: 
 + 
 +<code> 
 +$ dnf group upgrade <groupname> 
 +</code> 
 + 
 +===== Automating Updates with DNF ===== 
 + 
 +<code> 
 +$ dnf info dnf-automatic 
 +Last metadata expiration check: 23:06:08 ago on Fri 23 Oct 2026 02:35:15 PM. 
 +Available Packages 
 +Name         : dnf-automatic 
 +Version      : 4.20.0 
 +Release      : 22.el10_2.alma.1 
 +Architecture : noarch 
 +Size         : 37 k 
 +Source       : dnf-4.20.0-22.el10_2.alma.1.src.rpm 
 +Repository   : baseos 
 +Summary      : Package manager - automated upgrades 
 +URL          : https://github.com/rpm-software-management/dnf 
 +License      : GPL-2.0-or-later AND GPL-1.0-only 
 +Description  : Systemd units that can periodically download package upgrades and apply 
 +             : them. 
 +</code> 
 +===== Working with local .rpm files =====
  
 <code> <code>
-$ sudo dnf install watchdog-0:5.16-11.el10.x86_64.rpm+... download fubar-1.2.3.rpm 
 +$ dnf install fubar-1.2.3.rpm
 </code> </code>
  
  • rh124_dnf.1792702732.txt.gz
  • Last modified: 2026/10/22 20:58
  • by rpjday