Search code examples
yoctobitbakeopenembedded

How to clean, free space?


I have on openembedded build dir

92G tmp
21G tmp-glibc

How to clean unneeded files? Old versions, abandoned targets, cache...

Is there any options to bitbake not to make copy of dependensies to each recipe?

I want delete all not needed for one selected task


Solution

  • You can just delete tmp whenever, as everything in there can be rebuilt if required. Using the rm_work class will delete the work directories of completed builds and actually only has a very small impact on build times, especially if you tune the mount parameters so the write cache timeout is more than a few seconds, as a recipe can often build and be deleted before it needs to even be written to disk.

    sstate-cache is all cache, as the name suggests. There are tools such as sstate-cache-management to selectively prune, but the easier way is to just delete everything that hasn't been accessed for a while. This will delete everything that hasn't been accessed for two months:

    $ find /path/to/sstate-cache -type f -atime +60 -delete