DNF5-INSTALLROOT(7)

✨ dnf5-installroot β€” the Installroot Parameter, explained by your fave ✨

okay so this is a page from the dnf5 manual, section 7 (miscellaneous, iykyk), and it's all about one lil flag that does a WHOLE lot: --installroot. let's get into it bestie πŸ’–


πŸŽ€ NAME πŸŽ€

dnf5-installroot β€” the Installroot Parameter. that's it, that's the name, she's simple but she's powerful πŸ’…


🌸 DESCRIPTION 🌸

so the --installroot parameter is what you use to specify an alternative installroot, relative to where all packages will be installed. think of it like doing chroot <root> dnf, except that using --installroot lets DNF5 work before the chroot is even created. main character energy honestly πŸ‘‘

here's the tea on what lives where:

  • cachedir, system_cachedir, log files, releasever, and gpgkey are taken from or stored in the installroot. OpenPGP keys get imported into the installroot from a path relative to the host, and you can specify that path in the repository section of configuration files. πŸ”‘
  • configuration file, reposdir, and vars are taken from inside the installroot β€” unless you pass the command-line argument --use-host-config, in which case the configuration and environment from the host system will be used. no cap. 🫢
Note: when a path is specified within a command line argument β€” that's --config=CONFIG_FILE_PATH in case of configuration file, --setopt=reposdir=/path/to/repodir for reposdir, --setopt=cachedir=/path/to/cachedir for cachedir, --setopt=system_cachedir=/path/to/system_cachedir for system_cachedir, --setopt=logdir=/path/to/logdir for logdir, or --setopt=varsdir=/paths/to/varsdir for vars β€” then this path is always relative to the host with no exceptions. periodt. also pluginpath and pluginconfpath are relative to the host. 🏠
Note: you may also want to use the command-line option --releasever=RELEASEVER when creating the installroot, otherwise the $releasever value is taken from the rpmdb within the installroot (and thus it is empty at the time of creation and the transaction will fail 😭). if --use-host-config is used, the releasever will be detected from the host (/) system. and btw the new installroot path at the time of creation does not contain the repository, releasever and dnf.conf files. it's giving empty apartment, no furniture, not even a candle πŸ•―οΈ
Note: on a modular system you may also want to use the --setopt=module_platform_id=<module_platform_name:stream> command-line option when creating the installroot, otherwise the module_platform_id value will be taken from the /etc/os-release file within the installroot (and thus it will be empty at the time of creation, the modular dependency could be unsatisfied and modules content could be excluded). so like, set it, bestie, fr fr πŸ¦‹

🌈 EXAMPLES 🌈

k these are the actual example commands, copy them exactly, do not improvise πŸ’œ

dnf5 --installroot=INSTALLROOT --releasever=RELEASEVER install
system-release
  • permanently sets the releasever of the system in the INSTALLROOT directory to RELEASEVER. iconic, permanent, no take-backs ⭐
dnf5 --installroot=INSTALLROOT --setopt=reposdir=PATH --config
/path/dnf.conf upgrade
  • upgrades packages inside the installroot from a repository described by --setopt using configuration from /path/dnf.conf. glow up in progress ✨

🧚 Author 🧚

see AUTHORS.md in dnf5 source distribution. the whole squad, we love them 🫢


Contributors to the dnf5 project. πŸ’–


and that's the whole page, bestie! this one was the DNF5-INSTALLROOT(7) page from the dnf5 manual, dated Sep 24, 2026 β€” big slay, big installroot, go forth and build your chroots responsibly πŸŒΈπŸŽ€πŸ’…

πŸ“¦ where this page comes from