Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should the sstate-cache directory be deleted in Yocto?

Tags:

yocto

bitbake

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?

like image 460
yoctotutor.com Avatar asked Jul 27 '17 04:07

yoctotutor.com


1 Answers

According to the Yocto Reference Manual it is safe 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 and it will be growing again to the size it needs to build 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.

like image 172
g0hl1n Avatar answered Oct 21 '22 16:10

g0hl1n