.\" Man page generated from reStructuredText.
.
.
.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-SWAP" "8" "Sep 19, 2025" "" "dnf5"
.SH NAME
dnf5-swap \- Swap Command
.SH SYNOPSIS
.sp
\fBdnf5 swap [options] <remove\-spec> <install\-spec>\fP
.SH DESCRIPTION
.sp
The \fBswap\fP command in \fBDNF5\fP is used for removing a package while installing
a different one in a single transaction.
Both \fB<remove\-spec>\fP and \fB<install\-spec>\fP are \fB<package\-spec\-NPFB>\fP
.SH OPTIONS
.INDENT 0.0
.TP
.B \fB\-\-allowerasing\fP
.nf
Allow removing of installed packages to resolve any potential dependency problems.
.fi
.sp
.UNINDENT
.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\-\-from\-repo=REPO_ID,...\fP
.nf
Packages (or their provides) explicitly specified on the command line will only be looked up in the specified repositories.
These repositories are automatically enabled.
Repository enabling and disabling still applies. Dependencies of these packages will be resolved from any enabled repository.
.fi
.sp
.UNINDENT
.INDENT 0.0
.TP
.B \fB\-\-offline\fP
.nf
Store the transaction to be performed offline. See \fI\%offline command\fP, \fBdnf5\-offline(8)\fP\&.
.fi
.sp
.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 \fI\%replay command\fP, \fBdnf5\-replay(8)\fP\&.
.fi
.sp
.UNINDENT
.SH EXAMPLES
.INDENT 0.0
.TP
.B \fBdnf5 swap mlocate plocate\fP
.nf
Remove the \fBmlocate\fP package and install the \fBplocate\fP instead in the single transaction.
.fi
.sp
.UNINDENT
.SH SEE ALSO
.INDENT 0.0
.INDENT 3.5
.nf
\fBdnf5\-specs(7)\fP, \fI\%Patterns specification\fP
.fi
.sp
.UNINDENT
.UNINDENT
.SH AUTHOR
See AUTHORS.md in dnf5 source distribution.
.SH COPYRIGHT
Contributors to the dnf5 project.
.\" Generated by docutils manpage writer.
.
