如何列出使用 microdnf 作为软件包管理器的 Linux 发行版中已安装的内容?

huangapple go评论107阅读模式
英文:

How to list what is installed in a linux distribution that is using microdnf as package manager?

问题

我试图基于https://hub.docker.com/r/redhat/ubi9-minimal创建一个镜像,该镜像使用microdnf作为其包管理器。

我注意到在安装python3后,除了它的直接依赖项之外,还安装了一些其他包。

我想进行调查,但奇怪的是microdnf没有像dfn或yum那样的list命令。 如何列出使用 microdnf 作为软件包管理器的 Linux 发行版中已安装的内容?

用法:
  microdnf [选项...] 命令

命令:
  upgrade              升级软件包
  update               “upgrade”命令的兼容别名
  module reset         重置模块流
  distro-sync          将软件包升级/降级以匹配存储库中的版本
  dsync                “distro-sync”命令的兼容别名
  remove               移除软件包
  reinstall            重新安装软件包
  clean                删除缓存数据
  repolist             列出存储库
  module enable        启用模块流
  download             下载软件包
  makecache            生成元数据缓存
  module disable       禁用模块流
  repoquery            搜索匹配关键字的软件包
  install              安装软件包

我如何知道在使用microdnf的这种发行版上安装了什么?

英文:

I'm trying to create an image based on https://hub.docker.com/r/redhat/ubi9-minimal which has microdnf as its package manager.

I noted that after I installed python3 on it, some more packages was installed other than its direct dependencies.

I want to investigate, but strangely microdnf doesn't have a list command as dfn or yum has. 如何列出使用 microdnf 作为软件包管理器的 Linux 发行版中已安装的内容?

Usage:
  microdnf [OPTION…] COMMAND

Commands:
  upgrade              Upgrade packages
  update               Compatibility alias for the "upgrade" command
  module reset         Reset a module stream
  distro-sync          Upgrade/downgrade packages to match versions in repositories
  dsync                Compatibility alias for the "distro-sync" command
  remove               Remove packages
  reinstall            Reinstall packages
  clean                Remove cached data
  repolist             List repositories
  module enable        Enable a module stream
  download             Download packages
  makecache            Generate the metadata cache
  module disable       Disable a module stream
  repoquery            Search for packages matching keyword
  install              Install packages


How can I know what is installed on such distribution that is using microdnf ?

答案1

得分: 2

我发现ubi9-minimal基础镜像中有rpm工具。

因此,要列出已安装的包,请键入rpm -qa

英文:

I've discovered that the ubi9-minimal base image has the rpm tool.

So, to list the installed packages on it, just type rpm -qa

huangapple
  • 本文由 发表于 2023年3月7日 19:48:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/75661604.html
  • redhat-containers
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定