List packages in a repository.
--- a/dnf.rst Wed Nov 08 13:55:50 2023 +0200
+++ b/dnf.rst Tue Nov 14 17:45:40 2023 +0200
@@ -5,6 +5,26 @@
.. contents::
:local:
+List repositories
+=================
+
+List subscription repos::
+
+ sudo subscription-manager repos --list
+
+List enabled repositories::
+
+ sudo dnf repolist
+ sudo dnf repolist --enabled
+
+List disabled repositories::
+
+ sudo dnf repolist --disabled
+
+Activate repository::
+
+ sudo subscription-manager repos --enable $REPO
+
List packages
=============
@@ -17,6 +37,10 @@
dnf repoquery --userinstalled
dnf history userinstalled
+List packages in a repository::
+
+ dnf repository-packages $REPO list
+
Check package details
=====================
@@ -41,8 +65,8 @@
dnf repoquery -l $PKG
rpm -ql $PKG
-Find packages a file belong to
-==============================
+Find packages a file belongs to
+===============================
Using remote metadata::
@@ -53,6 +77,10 @@
rpm -qf /usr/bin/rpm
+Limit search to a specific repository::
+
+ dnf repoquery --disablerepo=* --enablerepo=$REPO -f $PATT
+
List package dependencies
=========================
::
@@ -98,4 +126,19 @@
sudo dnf module reset nodejs
sudo dnf module install nodejs:16
+Subscription manager
+====================
+
+https://developers.redhat.com/articles/renew-your-red-hat-developer-program-subscription
+ To renew subscription just login to https://developers.redhat.com/ and wait 15 min.
+
+Cleanup actions from broken previous subscription::
+
+ sudo subscription-manager remove --all
+ sudo subscription-manager unregister
+ sudo subscription-manager clean
+ sudo subscription-manager register --username ...
+ sudo subscription-manager refresh
+ sudo subscription-manager attach --auto
+