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