From 99074e95460040e19f6f03f5307611312de94c19 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 22 Apr 2024 23:58:58 +0200 Subject: [PATCH] chore(dnf): add quick note improvements and example --- examples/dnf.conf | 9 +++++++++ knowledge base/dnf.md | 26 ++++++++++++++++---------- 2 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 examples/dnf.conf diff --git a/examples/dnf.conf b/examples/dnf.conf new file mode 100644 index 0000000..4d38e46 --- /dev/null +++ b/examples/dnf.conf @@ -0,0 +1,9 @@ +[main] +gpgcheck = True +installonly_limit = 2 +clean_requirements_on_remove = True +best = False +skip_if_unavailable = True +max_parallel_downloads = 10 +deltarpm = True +fastestmirror = True diff --git a/knowledge base/dnf.md b/knowledge base/dnf.md index 879c248..cf42115 100644 --- a/knowledge base/dnf.md +++ b/knowledge base/dnf.md @@ -1,14 +1,17 @@ # DNF -## Table of contents - 1. [TL;DR](#tldr) 1. [Lock packages versions](#lock-packages-versions) 1. [Further readings](#further-readings) -1. [Sources](#sources) + 1. [Sources](#sources) ## TL;DR +Global configuration file at `/etc/dnf/dnf.conf`.
+Repositories `.repo` files reside under `/etc/yum.repos.d/`.
+Configuration files use the INI format. **Some** options in the repository definition override the global settings for +DNF. + ```sh # Check whether updates are available. dnf check-update @@ -66,10 +69,9 @@ dnf makecache dnf updateinfo dnf updateinfo list --security -# Upgrade packages to the latest version of theirs that is both available and -# resolvable. +# Upgrade packages to the latest version of theirs that is both available and resolvable. dnf upgrade -dnf upgrade --bugfix +dnf upgrade --bugfix --exclude 'sshpass' dnf upgrade --nobest --security dnf upgrade --advisories='FEDORA-2021-74ebf2f06f,FEDORA-2021-83fdddca0f' @@ -151,13 +153,14 @@ Not to mention, ## Further readings +- [DNF Command Reference] - [Man page] +- [DNF Configuration Reference] -## Sources - -All the references in the [further readings] section, plus the following: +### Sources - [cheat.sh] +- [Using the DNF software package manager] - [How to install only security and bugfixes updates with DNF] - [How to use YUM/DNF to downgrade or rollback some package updates?] - [How to lock kernel (or another package) on Fedora] @@ -167,7 +170,10 @@ All the references in the [further readings] section, plus the following: --> -[further readings]: #further-readings + +[dnf command reference]: https://dnf.readthedocs.io/en/latest/command_ref.html +[dnf configuration reference]: https://dnf.readthedocs.io/en/latest/conf_ref.html +[using the dnf software package manager]: https://docs.fedoraproject.org/en-US/quick-docs/dnf/ [cheat.sh]: https://cheat.sh/dnf