chore(dnf): extend commands list

This commit is contained in:
Michele Cereda
2024-06-28 23:46:56 +02:00
parent adfd4dc7fb
commit 744692a04e
2 changed files with 31 additions and 0 deletions

View File

@@ -139,6 +139,20 @@ dnf install 'python3-dnf-plugin-versionlock'
``` ```
```sh ```sh
# Get information about packages.
dnf info 'xfsprogs'
dnf repoquery -i 'openssh'
dnf repoquery --info 'bash'
# List available package versions.
dnf list --available --showduplicates 'gitlab-runner'
dnf repoquery 'httpd'
# List installed packages.
dnf list installed
rpm --query -a
rpmquery -a
# List locked versions. # List locked versions.
dnf versionlock dnf versionlock
dnf versionlock list dnf versionlock list
@@ -150,6 +164,17 @@ dnf versionlock add 'docker-ce' 'docker-ce-cli' 'docker-ce-rootless-extras'
# Unlock versions. # Unlock versions.
dnf versionlock delete 'kernel' 'docker-ce-20.10.23-3.el8' dnf versionlock delete 'kernel' 'docker-ce-20.10.23-3.el8'
dnf versionlock clear dnf versionlock clear
# List files in packages.
dnf repoquery -l 'nginx'
dnf repoquery --list 'postgresql15'
# Get packages providing specific files.
dnf whatprovides '/usr/bin/psql'
dnf whatprovides '*/pgbench'
# Check packages' changelog.
dnf repoquery --changelog 'libvirt'
``` ```
The _versionlock_ plugin maintains the constraints in its configuration file and automatically checks the constraints on every run. The _versionlock_ plugin maintains the constraints in its configuration file and automatically checks the constraints on every run.
@@ -175,6 +200,7 @@ Not to mention,
- [How to lock kernel (or another package) on Fedora] - [How to lock kernel (or another package) on Fedora]
- [Appendix A. DNF commands list] - [Appendix A. DNF commands list]
- [A quick guide to DNF for yum users] - [A quick guide to DNF for yum users]
- [How to list package files with dnf in Linux]
<!-- <!--
Reference Reference
@@ -194,6 +220,7 @@ Not to mention,
[a quick guide to dnf for yum users]: https://opensource.com/article/18/8/guide-yum-dnf [a quick guide to dnf for yum users]: https://opensource.com/article/18/8/guide-yum-dnf
[cheat.sh]: https://cheat.sh/dnf [cheat.sh]: https://cheat.sh/dnf
[how to install only security and bugfixes updates with dnf]: https://fedoramagazine.org/how-to-install-only-security-and-bugfixes-updates-with-dnf/ [how to install only security and bugfixes updates with dnf]: https://fedoramagazine.org/how-to-install-only-security-and-bugfixes-updates-with-dnf/
[how to list package files with dnf in linux]: https://www.cyberciti.biz/faq/dnf-list-package-files-for-rhel-centosstream-feora-rocky-almalinux/
[how to lock kernel (or another package) on fedora]: https://robbinespu.gitlab.io/posts/locking-package-fedora/ [how to lock kernel (or another package) on fedora]: https://robbinespu.gitlab.io/posts/locking-package-fedora/
[how to use yum/dnf to downgrade or rollback some package updates?]: https://access.redhat.com/solutions/29617 [how to use yum/dnf to downgrade or rollback some package updates?]: https://access.redhat.com/solutions/29617
[libsolv]: https://github.com/openSUSE/libsolv [libsolv]: https://github.com/openSUSE/libsolv

View File

@@ -28,3 +28,7 @@ cat <<-EOF | sudo tee -a /etc/yum.repos.d/vscodium.repo
repo_gpgcheck=1 repo_gpgcheck=1
gpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg gpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
EOF EOF
# List files in packages
dnf repoquery -l 'nginx'