DNF5-SWAP(8)

πŸ’– dnf5-swap(8) β€” the swap command, bestie edition πŸ’–

okay so this is the manual page for dnf5-swap (that's the manual name right there, dnf5-swap(8), we're not being weird about it) and it's literally about trading one package for another in a single transaction. iconic behavior, honestly. πŸ¦‹


✨ NAME ✨

dnf5-swap β€” the Swap Command πŸŽ€


🌸 SYNOPSIS 🌸

dnf5 swap [options] <remove-spec> <install-spec>

πŸ’… DESCRIPTION πŸ’…

The swap command in DNF5 is the one that says "okay bestie, we're removing one package while installing a different one, and we're doing it all in one single transaction." No messy in-between state, no drama. ✨

Both <remove-spec> and <install-spec> are <package-spec-NPFB>. yes, both. fr fr.


πŸ”₯ OPTIONS πŸ”₯

  • --allowerasing β€” lets DNF5 remove already-installed packages if it needs to, so it can sort out any potential dependency problems. it's giving "do what you gotta do". 😀
  • --installed-from-repo=REPO_ID,... β€” filters your installed packages by the ID of the repository they were installed from. so you're like "only the ones from this repo, tyvm".
  • --from-repo=REPO_ID,... β€” packages (or their provides) that you explicitly typed on the command line will only be looked up in the repositories you name here. these repositories get automatically enabled. repository enabling and disabling still applies, tho. and dependencies of these packages? those get resolved from any enabled repository. 🫢
  • --from-vendor=VENDOR,... β€” a list of vendors separated by commas or spaces. globs are supported, like --from-vendor='Fedora\ project, vendorA, vendorB*, vendorC'. packages (or their provides) explicitly specified on the command line will only be looked up from the specified vendors. the vendor change check is bypassed for these packages. but the vendor is ignored (or vendor change policies, if allow_vendor_change=0, will still be used) for packages that satisfy dependencies. πŸ‘‘
  • --offline β€” store the transaction to be performed offline. see the offline command <#offline-command-ref-label>, dnf5-offline(8).
  • --transient β€” only applicable 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). πŸ’€

🌈 EXAMPLES 🌈

dnf5 swap mlocate plocate

Remove the mlocate package and install the plocate instead, in the single transaction. one in, one out, no cap. πŸ”„βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘


🫢 Author 🫢

See AUTHORS.md in dnf5 source distribution.

Contributors to the dnf5 project.


and that's the whole page, bestie!! this one came from the dnf5 source, dated Sep 24, 2026 β€” go forth and swap responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from