DNF Fork Of Yum

DNF aka Dandified YUM is a next generation Package Manager for RPM based Distribution. It was first introduced in Fedora 18 and it has replaced YUM utility in recent release of Fedora 22.


DNF Installation

To install DNF on RHEL/CentOS systems, you need to first install and enable epel-release repository.

# yum install epel-release
OR
# yum install epel-release -y
 
 
Next, install DNF package using yum command from epel-release repository.

# yum install dnf
 
 

1. Check DNF Version

# dnf --version
 

2. List Enabled DNF Repositories

# dnf repolist

 

3. List all Enabled and Disabled DNF Repositories

 # dnf repolist all
 

4. List all Available and Installed Packages using DNF

 # dnf list

 

 
5. List all Installed Packages using DNF
 
 # dnf list installed 
  

6. List all Available Packages using DNF

  # dnf list available 

 

7. Search for a Package using DNF

 # dnf search nano
 
 

8. See what Provides a file/sub-package?

 # dnf provides /bin/bash
 
 

9. Get Details of a Package using DNF


 # dnf info nano
 
 

10. Install a Package with DNF

 

# dnf install nano


 

 

11. Updating a Package using DNF

# dnf update systemd
 
 

12. Check for System Updates using DNF

# dnf check-update
 
 

13. Update All System Packages using DNF

 # dnf update
OR
# dnf upgrade
 
 

14. Remove/Erase a Package using DNF

# dnf remove nano
OR
# dnf erase nano
 
 

15. Remove Orphan Packages using DNF

# dnf autoremove
 
 

16. Remove Cached Packages using DNF

# dnf clean all
 
 

17. Get Help on Specific DNF Command

# dnf help clean
 
 

18. List all DNF Commands and Options

# dnf help
 
 

19. View History of DNF

# dnf history
 
 

20. List all Group Packages

# dnf grouplist
 
 

21. Install a Group Package using DNF

 
# dnf groupinstall 'Educational Software' 


22. Update a Group Package

# dnf groupupdate 'Educational Software'
 
 
 

23. Remove a Group Package

# dnf groupremove 'Educational Software'
 
 

24. Install a Package from Specific Repository

# dnf --enablerepo=epel install phpmyadmin
 
 

25. Synchronize Installed Packages to Stable Release

# dnf distro-sync
 
 

26. Reinstall a Package

# dnf reinstall nano
 
 

27. Downgrade a Package

# dnf downgrade acpid
 
 
Sample Output
Using metadata from Wed May 20 12:44:59 2015
No match for available package: acpid-2.0.19-5.el7.x86_64
Error: Nothing to do.
 
 
My observation: DNF does not downgraded the package as it is supposed to. It has also been reported as bug.

Conclusion

DNF is the upper state of the end of the art Package Manager YUM. It tends to do a lot of processing automatically which is not going to be praised by many experienced Linux System Administrator, as I believe. As a matter of example:
  1. --skip-broken is not recognized by DNF and there is no alternative.
  2. There is nothing like ‘resolvedep‘ command however you may run dnf provides.
  3. There is no ‘deplist‘ command to find package dependency.
  4. You exclude a repo, means the exclusion apply on all operations, unlike yum which excludes those repos only at the time of install and updates, etc.
 
 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

 

Comments