---
name: "dnf5-autoremove"
section: "8"
platform: "linux"
package: "dnf5"
version: "5.4.6.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dnf5-autoremove"
---

# dnf5-autoremove(8)

Autoremove Command

## NAME

dnf5-autoremove - Autoremove Command

## SYNOPSIS

**dnf5 autoremove**

## DESCRIPTION

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.

## OPTIONS

- **--offline**

  ```
  Store the transaction to be performed offline. See offline command <#offline-command-ref-label>, dnf5-offline(8).
  ```

- **--transient**

  Applicable only on bootc (bootable containers) systems. Perform transactions using a transient overlay which will be lost on the next reboot. See also the persistence \<#persistence-options-label\> configuration option.

- **--store=PATH**

  ```
  Store the current transaction in a directory at the specified PATH instead of running it.
  The stored transaction can be performed by the replay command <#replay-command-ref-label>, dnf5-replay(8).
  Note that repository ids in the stored transaction are mangled to @stored_transaction(repo_id) this is required
  because during replaying the stored repositories are recreated and they might collide with already present repositories
  (this doesn't apply to the special @System repository).
  ```

## Author

See AUTHORS.md in dnf5 source distribution.

## Copyright

Contributors to the dnf5 project.
