chore(dnf): add quick note improvements and example

This commit is contained in:
Michele Cereda
2024-04-22 23:58:58 +02:00
parent 1b68e9726e
commit 99074e9546
2 changed files with 25 additions and 10 deletions

9
examples/dnf.conf Normal file
View File

@@ -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

View File

@@ -1,7 +1,5 @@
# DNF # DNF
## Table of contents <!-- omit in toc -->
1. [TL;DR](#tldr) 1. [TL;DR](#tldr)
1. [Lock packages versions](#lock-packages-versions) 1. [Lock packages versions](#lock-packages-versions)
1. [Further readings](#further-readings) 1. [Further readings](#further-readings)
@@ -9,6 +7,11 @@
## TL;DR ## TL;DR
Global configuration file at `/etc/dnf/dnf.conf`.<br/>
Repositories `.repo` files reside under `/etc/yum.repos.d/`.<br/>
Configuration files use the INI format. **Some** options in the repository definition override the global settings for
DNF.
```sh ```sh
# Check whether updates are available. # Check whether updates are available.
dnf check-update dnf check-update
@@ -66,10 +69,9 @@ dnf makecache
dnf updateinfo dnf updateinfo
dnf updateinfo list --security dnf updateinfo list --security
# Upgrade packages to the latest version of theirs that is both available and # Upgrade packages to the latest version of theirs that is both available and resolvable.
# resolvable.
dnf upgrade dnf upgrade
dnf upgrade --bugfix dnf upgrade --bugfix --exclude 'sshpass'
dnf upgrade --nobest --security dnf upgrade --nobest --security
dnf upgrade --advisories='FEDORA-2021-74ebf2f06f,FEDORA-2021-83fdddca0f' dnf upgrade --advisories='FEDORA-2021-74ebf2f06f,FEDORA-2021-83fdddca0f'
@@ -151,13 +153,14 @@ Not to mention,
## Further readings ## Further readings
- [DNF Command Reference]
- [Man page] - [Man page]
- [DNF Configuration Reference]
## Sources ### Sources
All the references in the [further readings] section, plus the following:
- [cheat.sh] - [cheat.sh]
- [Using the DNF software package manager]
- [How to install only security and bugfixes updates with DNF] - [How to install only security and bugfixes updates with DNF]
- [How to use YUM/DNF to downgrade or rollback some package updates?] - [How to use YUM/DNF to downgrade or rollback some package updates?]
- [How to lock kernel (or another package) on Fedora] - [How to lock kernel (or another package) on Fedora]
@@ -167,7 +170,10 @@ All the references in the [further readings] section, plus the following:
--> -->
<!-- In-article sections --> <!-- In-article sections -->
[further readings]: #further-readings <!-- Upstream -->
[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/
<!-- Others --> <!-- Others -->
[cheat.sh]: https://cheat.sh/dnf [cheat.sh]: https://cheat.sh/dnf