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

Cri*_*ano 7 redhat-containers

我正在尝试创建一个基于https://hub.docker.com/r/redhat/ubi9-minimal的映像,该映像以 microdnf 作为其包管理器。

\n

我注意到在上面安装了 python3 后,除了它的直接依赖项之外,还安装了更多的软件包。

\n

我想调查一下,但奇怪的是 microdnf 没有listdfn 或 yum 那样的命令。:)

\n
Usage:\n  microdnf [OPTION\xe2\x80\xa6] COMMAND\n\nCommands:\n  upgrade              Upgrade packages\n  update               Compatibility alias for the "upgrade" command\n  module reset         Reset a module stream\n  distro-sync          Upgrade/downgrade packages to match versions in repositories\n  dsync                Compatibility alias for the "distro-sync" command\n  remove               Remove packages\n  reinstall            Reinstall packages\n  clean                Remove cached data\n  repolist             List repositories\n  module enable        Enable a module stream\n  download             Download packages\n  makecache            Generate the metadata cache\n  module disable       Disable a module stream\n  repoquery            Search for packages matching keyword\n  install              Install packages\n\n\n
Run Code Online (Sandbox Code Playgroud)\n

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

\n

Cri*_*ano 6

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

因此,要列出已安装的软件包,只需键入rpm -qa