Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm trying to create a Docker image based on Red Hat Universal Base Image 9 Minimal which has microdnf as its package manager.

I noted that after I installed Python 3 on it, some more packages were installed other than its direct dependencies.

I want to investigate, but strangely microdnf doesn't have a list command as DNF 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?

like image 608
Cristiano Avatar asked Jan 26 '26 08:01

Cristiano


1 Answers

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

like image 190
Cristiano Avatar answered Jan 29 '26 13:01

Cristiano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!