The size of my sstate-cache
directory of my YoctoProject "fido" environment is more than 3GB.
How can I delete the sstate-cache
directory in yocto/build-dir
?
Is it save to use rm -rf
or is there any other method?
According to the Yocto Reference Manual it is save to remove the complete build/tmp
directory including the sstate-cache
directory:
As a last resort, to clean up a build and start it from scratch (other than the downloads), you can remove everything in the tmp directory or get rid of the directory completely. If you do, you should also completely remove the build/sstate-cache directory. (see [1] and [2])
Furthermore you can remove the sstate-cache with bitbake
for a specific recipe by calling do_cleansstate
like shown below (see do_cleansstate).
$ bitbake -c cleansstate recipe
Please be aware that the Shared State Cache needs a lot of memory space and it will be growing again to the size it needs during building your images.
More detailed information on the Shared State Cache is available in following sections of the Yocto Reference Manual: Shared State Cache and sstate-cache.