redhat-containers

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


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. :)

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 ?


Solution

  • 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