disk-space.rst 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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
  13. :ref:`rm_work <ref-classes-rm-work>` class in the
  14. Yocto Project Reference Manual.
  15. Purging Duplicate Shared State Cache Files
  16. ==========================================
  17. After multiple build iterations, the Shared State (sstate) cache can contain
  18. duplicate cache files for a given package, while only the most recent one
  19. is likely to be reusable. The following command purges all but the
  20. newest sstate cache file for each package::
  21. sstate-cache-management.sh --remove-duplicated --cache-dir=build/sstate-cache
  22. This command will ask you to confirm the deletions it identifies.
  23. .. note::
  24. The duplicated sstate cache files of one package must have the same
  25. architecture, which means that sstate cache files with multiple
  26. architectures are not considered as duplicate.
  27. Run ``sstate-cache-management.sh`` for more details about this script.