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, andgpgkeyare 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, andvarsare 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_PATHin case of configuration file,--setopt=reposdir=/path/to/repodirfor reposdir,--setopt=cachedir=/path/to/cachedirfor cachedir,--setopt=system_cachedir=/path/to/system_cachedirfor system_cachedir,--setopt=logdir=/path/to/logdirfor logdir, or--setopt=varsdir=/paths/to/varsdirfor vars β then this path is always relative to the host with no exceptions. periodt. alsopluginpathandpluginconfpathare relative to the host. π
Note: you may also want to use the command-line option--releasever=RELEASEVERwhen creating the installroot, otherwise the$releasevervalue 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-configis 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 anddnf.conffiles. 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 themodule_platform_idvalue will be taken from the/etc/os-releasefile 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
INSTALLROOTdirectory toRELEASEVER. 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
--setoptusing configuration from/path/dnf.conf. glow up in progress β¨
π§ Author π§
see AUTHORS.md in dnf5 source distribution. the whole squad, we love them π«Ά
π Copyright π
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
- 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