0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Rocky Linux 9でdnf/yumリポジトリの一覧とリポジトリに含まれているパッケージを一覧表示する

Posted at

What'S?

タイトルどおりですが、メモとして。

現在使用できるdnf/yumリポジトリを一覧表示する

dnf repolistで。

$ dnf repolist
repo id                                                        repo の名前
appstream                                                      Rocky Linux 9 - AppStream
baseos                                                         Rocky Linux 9 - BaseOS
epel                                                           Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264                                            Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64
extras                                                         Rocky Linux 9 - Extras
pgdg-common                                                    PostgreSQL common RPMs for RHEL / Rocky / AlmaLinux 9 - x86_64
pgdg12                                                         PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64
pgdg13                                                         PostgreSQL 13 for RHEL / Rocky / AlmaLinux 9 - x86_64
pgdg14                                                         PostgreSQL 14 for RHEL / Rocky / AlmaLinux 9 - x86_64
pgdg15                                                         PostgreSQL 15 for RHEL / Rocky / AlmaLinux 9 - x86_64
pgdg16                                                         PostgreSQL 16 for RHEL / Rocky / AlmaLinux 9 - x86_64
pgdg17                                                         PostgreSQL 17 for RHEL / Rocky / AlmaLinux 9 - x86_64

ちょっと作為的にPostgreSQLのリポジトリを追加しています。

デフォルトでは有効なリポジトリのみを表示するので、すべて表示する場合は--allオプションをつけます。

$ dnf repolist --all

有効なもののみ(デフォルト)、無効なもののみを表示する場合は、それぞれ--enabledおよび--disabledオプションをつけます。

$ dnf repolist --enabled


$ dnf repolist --disabled

# 特定のリポジトリに含まれるパッケージを一覧表示する

パッケージの一覧を表示するには`dnf list`を使います。

```shell
$ dnf list

デフォルトではすべてのパッケージが表示されるので、特定のリポジトリに絞って表示したい場合は--repoまたは--repoidオプションでリポジトリのidを指定します。

$ dnf list --repo pgdg16


$ dnf list --repoid pgdg16

ここで指定するリポジトリのidは、dnf repolistで確認したものですね。

確認環境

$ cat /etc/redhat-release
Rocky Linux release 9.5 (Blue Onyx)


$ uname -srvmpio
Linux 5.14.0-503.26.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 19 16:28:19 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux


$ dnf --version
4.14.0
  インストール済み: dnf-0:4.14.0-17.el9.noarch (日時: 2025年02月24日 11時32分07秒)
  ビルド      : Rocky Linux Build System (Peridot) <releng@rockylinux.org>  (日時: 2024年11月05日 18時52分35秒)

  インストール済み: rpm-0:4.16.1.3-34.el9.0.1.x86_64 (日時: 2025年02月24日 11時30分52秒)
  ビルド      : Rocky Linux Build System (Peridot) <releng@rockylinux.org>  (日時: 2024年11月04日 20時51分43秒)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?