.\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "DNF5-REMOVE" "8" "Sep 06, 2026" "" "dnf5" .SH NAME dnf5-remove \- Remove Command .SH SYNOPSIS .sp \fBdnf5 remove [options] |@|@...\fP .sp \fBdnf5 remove \-\-oldinstallonly [\-\-limit=] [...]\fP .sp \fBdnf5 remove \-\-duplicates [...]\fP .SH DESCRIPTION .sp The \fBremove\fP command in \fBDNF5\fP is used for removing installed packages, groups or environments from the system. .sp If you want to keep the dependencies that were installed together with the given package, set the \fBclean_requirements_on_remove\fP configuration option to \fBFalse\fP\&. .sp When the \fB\-\-oldinstallonly\fP option is used, the command removes old installonly packages (e.g. kernels) that exceed the configured \fBinstallonly_limit\fP\&. The currently running kernel is never removed. If package specs are provided, only matching installonly packages are considered for removal. .sp When the \fB\-\-duplicates\fP option is used, the command removes older versions of duplicate packages. Duplicate packages are packages with the same name and architecture but different version installed on the system. Installonly packages (such as kernels) are excluded since they are expected to have multiple versions installed. To ensure the integrity of the system, the newest version of each duplicate is reinstalled. If package specs are provided, only matching packages are considered. .SH OPTIONS .INDENT 0.0 .TP .B \fB\-\-installed\-from\-repo=REPO_ID,...\fP .nf Filters installed packages by the ID of the repository they were installed from. .fi .sp .UNINDENT .INDENT 0.0 .TP .B \fB\-\-no\-autoremove\fP .nf Disable removal of dependencies that are no longer used. .fi .sp .TP .B \fB\-\-oldinstallonly\fP .nf Remove old installonly packages that exceed the \fBinstallonly_limit\fP configuration value. When used without package specs, all installonly package types are considered. The currently running kernel is automatically skipped. .fi .sp .TP .B \fB\-\-limit=\fP .nf Override the \fBinstallonly_limit\fP configuration value. Must be greater than or equal to 1 to keep at least the newest installed version. Can only be used with \fB\-\-oldinstallonly\fP\&. .fi .sp .TP .B \fB\-\-duplicates\fP .nf Remove older versions of duplicate packages and reinstall the newest version. Installonly packages are automatically excluded. Cannot be used together with \fB\-\-oldinstallonly\fP\&. .fi .sp .UNINDENT .INDENT 0.0 .TP .B \fB\-\-offline\fP .nf Store the transaction to be performed offline. See offline command \%<#\:offline-command-ref-label>, \fBdnf5\-offline(8)\fP\&. .fi .sp .UNINDENT .INDENT 0.0 .TP .B \fB\-\-transient\fP 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. .TP .B \fB\-\-store=PATH\fP .nf Store the current transaction in a directory at the specified \fBPATH\fP instead of running it. The stored transaction can be performed by the replay command \%<#\:replay-command-ref-label>, \fBdnf5\-replay(8)\fP\&. Note that repository ids in the stored transaction are mangled to \fB@stored_transaction(repo_id)\fP this is required because during replaying the stored repositories are recreated and they might collide with already present repositories (this doesn\(aqt apply to the special @System repository). .fi .sp .UNINDENT .SH EXAMPLES .INDENT 0.0 .TP .B \fBdnf5 remove tito\fP .nf Remove the \fBtito\fP package. .fi .sp .TP .B \fBdnf5 remove \-\-oldinstallonly\fP .nf Remove all old installonly packages exceeding the configured \fBinstallonly_limit\fP\&. .fi .sp .TP .B \fBdnf5 remove \-\-oldinstallonly kernel\fP .nf Remove old kernel packages exceeding the configured \fBinstallonly_limit\fP\&. .fi .sp .TP .B \fBdnf5 remove \-\-oldinstallonly \-\-limit=2\fP .nf Remove old installonly packages, keeping only the 2 newest versions of each. .fi .sp .TP .B \fBdnf5 remove \-\-duplicates\fP .nf Remove all older duplicate packages and reinstall the newest versions. .fi .sp .TP .B \fBdnf5 remove \-\-duplicates glibc\fP .nf Remove older duplicate versions of \fBglibc\fP and reinstall the newest. .fi .sp .UNINDENT .SH SEE ALSO .INDENT 0.0 .INDENT 3.5 .nf \fBdnf5\-specs(7)\fP, Patterns specification \%<#\:specs-misc-ref-label> .fi .sp .UNINDENT .UNINDENT .SH Author See AUTHORS.md in dnf5 source distribution. .SH Copyright Contributors to the dnf5 project. .\" End of generated man page.