List packages in a repository.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 14 Nov 2023 17:45:40 +0200
changeset 2571 a7c8e493887f
parent 2570 f1aad564e5d5
child 2572 9390895f4164
List packages in a repository.
dnf.rst
--- 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
+