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 theinstallonly_limitconfiguration value. used without package specs, all installonly package types are considered. and the currently running kernel? automatically skipped, always π--limit=<LIMIT>β overrides theinstallonly_limitconfiguration 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 specifiedPATHinstead 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@Systemrepository) π
π₯ 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 π
dnf5-specs(7)- Patterns specification <#specs-misc-ref-label>
π Author π
see AUTHORS.md in the dnf5 source distribution π«Ά
β Copyright β
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
- fedora 44: dnf5 5.4.6.0-1.fc44 Β· GPL-2.0-or-later
- fedora 44: dnf5 5.4.6.0-1.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms