11月 202022
 

查看当前启用仓库列表并禁用仓库

[ops@localhost ~]$ sudo dnf repolist
[sudo] password for ops: 
repo id             repo name
appstream           Rocky Linux 9 - AppStream
baseos              Rocky Linux 9 - BaseOS
extras              Rocky Linux 9 - Extras
[ops@localhost ~]$ sudo dnf config-manager --disable appstream
[ops@localhost ~]$ sudo dnf config-manager --disable baseos
[ops@localhost ~]$ sudo dnf config-manager --disable extras
[ops@localhost ~]$ 

检查可用性

[ops@localhost ~]$ sudo dnf makecache
There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
[ops@localhost ~]$