The autoremove command in DNF5 is used for removing unneeded packages from the system.
Unneeded packages are all "leaf" packages that were originally installed as dependencies of user-installed packages, but which are no longer required by any such package.
Installonly packages (e.g. kernels) are never automatically removed by this command even if they were installed as dependencies.
See AUTHORS.md in dnf5 source distribution.
Contributors to the dnf5 project.