DNF5-REMOVE(8)

✨ DNF5-REMOVE(8) ✨

okay bestie, welcome to dnf5-remove, the manual page for the Remove Command in the dnf5 family πŸ’… she's the one you call when you need stuff gone from your system. this page is part of the dnf5 manual set, so you're in the right place 🫢


🌸 NAME 🌸

dnf5-remove β€” the Remove Command ✨ (yes she removes things, that's the whole vibe)


πŸŽ€ SYNOPSIS πŸŽ€

dnf5 remove [options]
<package-spec-NF>|@<group-spec>|@<environment-spec>...

dnf5 remove --oldinstallonly [--limit=<LIMIT>] [<package-spec-NF>...]

dnf5 remove --duplicates [<package-spec-NF>...]

πŸ’– DESCRIPTION πŸ’–

so, the remove command in DNF5? it's literally the girl for yeeting installed packages, groups, or environments off your system. poof. gone. πŸ¦‹

now listen β€” if you wanna keep the dependencies that got installed alongside the package you're removing, you gotta set the clean_requirements_on_remove configuration option to False. otherwise they might get swept up too, and that's giving collateral damage 😭

when you use the --oldinstallonly option, the command removes old installonly packages (kernels, bestie, we're talking kernels) that go over the configured installonly_limit. and nope β€” the currently running kernel is never removed. she would never do that to you πŸ™ˆ if you pass package specs along with it, only the matching installonly packages get considered for removal.

when you use the --duplicates option, the command removes older versions of duplicate packages. so what even is a duplicate? it's packages with the same name and architecture but different version installed on your system. Installonly packages (kernels, hi again) are excluded, because they're supposed to have multiple versions installed β€” that's their whole thing. and to keep the system's integrity intact, the newest version of each duplicate gets reinstalled. if you pass package specs, only matching packages are considered πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • --installed-from-repo=REPO_ID,... β€” filters installed packages by the ID of the repository they were installed from. like, "only the ones that came from here" πŸ”
  • --no-autoremove β€” disables removal of dependencies that are no longer used. you're telling her to leave the leftovers alone, no cap 🚫
  • --oldinstallonly β€” removes old installonly packages that exceed the installonly_limit configuration value. used without package specs, all installonly package types are considered. and the currently running kernel? automatically skipped, always πŸ’€
  • --limit=<LIMIT> β€” overrides the installonly_limit configuration value. must be greater than or equal to 1 so you keep at least the newest installed version. and heads up: this can only be used with --oldinstallonly.
  • --duplicates β€” removes older versions of duplicate packages and reinstalls the newest version. installonly packages are automatically excluded. and bestie β€” this cannot be used together with --oldinstallonly πŸ™…
  • --offline β€” stores the transaction to be performed offline. see offline command <#offline-command-ref-label>, dnf5-offline(8) πŸŒ™
  • --transient β€” only applicable on bootc (bootable containers) systems. performs transactions using a transient overlay which will be lost on the next reboot. see also the persistence <#persistence-options-label> configuration option ✨
  • --store=PATH β€” stores 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 get 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) πŸŽ€

πŸ”₯ EXAMPLES πŸ”₯

dnf5 remove tito : removes the tito package. bye girl πŸ’–

dnf5 remove --oldinstallonly : removes all old installonly packages exceeding the configured installonly_limit.

dnf5 remove --oldinstallonly kernel : removes old kernel packages exceeding the configured installonly_limit.

dnf5 remove --oldinstallonly --limit=2 : removes old installonly packages, keeping only the 2 newest versions of each.

dnf5 remove --duplicates : removes all older duplicate packages and reinstalls the newest versions.

dnf5 remove --duplicates glibc : removes older duplicate versions of glibc and reinstalls the newest.


🌈 SEE ALSO 🌈


πŸ‘‘ Author πŸ‘‘

see AUTHORS.md in the dnf5 source distribution 🫢

Contributors to the dnf5 project.


and that's the whole page bestie!! this was dnf5 manual, dated Sep 24, 2026 β€” go forth and remove responsibly, mwah πŸ’‹πŸŒΈπŸ’œ

πŸ“¦ where this page comes from