Linux

Where Does mkosi Store Configs and Cache?

mkosi image configs and caches on Linux, mkosi.images plus workspace outputs.

Last updated

mkosi builds OS images from declarative configs in the project tree. mkosi.conf at the root plus mkosi.images fragments define packages and partitions. Outputs land in the workspace directory.

Cache under the user cache home accelerates rebuilds. The configs are the durable part. Version them and treat outputs as disposable artifacts.

Where mkosi stores this, by platform

Linux
~/.cache/mkosi

Project root config plus fragments directory. Keep both in git. Workspace outputs regenerate from these two alone.

Frequently asked questions

What do I back up for mkosi?

Commit mkosi.conf and mkosi.images to git. That pair rebuilds the image anywhere. Caches speed rebuilds but never substitute for config.

Where are mkosi outputs and cache?

Check .mkosi-private or the configured workspace for outputs. Cache lives under the XDG cache home. Clean the cache when images bloat, not the configs.

Notice an outdated path? Let us know.