dnf

 

'@anaconda' means that the package was installed by the Anaconda installer.

 

  1. dnf upgrade --repo update* --exclude kernel*

     

  2. 下载源码rpm包
    dnf download --source crun

     

     

  3. 查看使用的mirror
    dnf download --url glx-utils

     

  4. download specific architecture, 与包名要完全对应, 可先使用dnf info glx-utils查看可以architecture
    dnf download --arch x86_64 glx-utils

     

  5. download debuginfo debugsource 
    dnf download --debuginfo crun
    dnf download --debugsource glx-utils

     

     

  6. find all versions 
    dnf repoquery --show-duplicates docker-ce

     

     

  7. show only results that owns FILE
    dnf repoquery --file /etc/xattr.conf

     

  8. don't install weak dependencies
    dnf install --setopt=install_weak_deps=false --best langpacks-zh_CN

     

/etc/dnf/dnf.conf

[main]
gpgcheck=True
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
excludepkgs=kernel*

 

 

repo:

复制代码
[RepositoryID]
name= $releaserver - $arch - $basearch
baseurl=url://server1/path/to/repository/
        url://server2/path/to/repository/
        url://server3/path/to/repository/
enabled=1|0              # default 1
gpgcheck=1|0             # default 1
cost=1000                # default 1000
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
failovermethod=roundrobin|priority
metadata_expire=7d
type=rpm
skip_if_unavailable=False
复制代码

 

复制代码
dnf repolist [all|enabled|disabled]
dnf list all [glob_exp]
dnf list available [glob_exp]                list available and installed
dnf list updates [glob_exp]                  list updates available in dnf repository
dnf list installed [glob_exp]                  list installed packeges
dnf list extras [glob_exp]                      list installed but are not available in dnf repository
dnf reinstall packges
dnf check-update [glob_exp]
dnf clean
dnf makecache
dnf search [all] string        默认只搜索name和summary含有指定string的包
dnf repoquery --deplist package
dnf history subcommand

--nogpgcheck
--disablerepo=
--enablerepo=
--noplugins
--exclude=packge
--skip-broken
--disablerepo="*" --enablerepo=epel
复制代码

 

posted @   ascertain  阅读(187)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2022-01-25 Alpine
2022-01-25 Clear file content & command truncate
点击右上角即可分享
微信分享提示