24 Conserving Disk Space
24.1 Conserving Disk Space During Builds
To help conserve disk space during builds, you can add the following
statement to your project’s local.conf
configuration file found in
the Build Directory:
INHERIT += "rm_work"
Adding this statement deletes the work directory used for building a recipe once the recipe is built. For more information on “rm_work”, see the rm_work class in the Yocto Project Reference Manual.
When you inherit this class and build a core-image-sato
image for a
qemux86-64
machine from an Ubuntu 22.04 x86-64 system, you end up with a
final disk usage of 22 Gbytes instead of 90 Gbytes. However,
40 Gbytes of initial free disk space are still needed to
create temporary files before they can be deleted.