disk-space.rst 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Conserving Disk Space
  3. *********************
  4. Conserving Disk Space During Builds
  5. ===================================
  6. To help conserve disk space during builds, you can add the following
  7. statement to your project's ``local.conf`` configuration file found in
  8. the :term:`Build Directory`::
  9. INHERIT += "rm_work"
  10. Adding this statement deletes the work directory used for
  11. building a recipe once the recipe is built. For more information on
  12. "rm_work", see the :ref:`ref-classes-rm-work` class in the
  13. Yocto Project Reference Manual.
  14. Purging Duplicate Shared State Cache Files
  15. ==========================================
  16. After multiple build iterations, the Shared State (sstate) cache can contain
  17. duplicate cache files for a given package, while only the most recent one
  18. is likely to be reusable. The following command purges all but the
  19. newest sstate cache file for each package::
  20. sstate-cache-management.sh --remove-duplicated --cache-dir=build/sstate-cache
  21. This command will ask you to confirm the deletions it identifies.
  22. .. note::
  23. The duplicated sstate cache files of one package must have the same
  24. architecture, which means that sstate cache files with multiple
  25. architectures are not considered as duplicate.
  26. Run ``sstate-cache-management.sh`` for more details about this script.