Bug 15182

Summary: Document the method to prune sstate-cache of old entries
Product: [Documentation] Development Manual Reporter: Yoann Congal <yoann.congal>
Component: developmentAssignee: Michael Opdenacker <michael.opdenacker>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: jester, randy.macleod, richard.purdie, yoann.congal
Version: unspecified   
Target Milestone: 4.3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Yoann Congal 2023-08-04 10:54:55 UTC
We should put in the manual the method to prune sstate-cache of old entries

Maybe here : https://docs.yoctoproject.org/dev-manual/disk-space.html#purging-duplicate-shared-state-cache-files ?

This method is flying around regularly :
[12:18:58 pm] <rburton> LetoThe2nd: i use find $SSTATE -type f -atime +$DAYS -delete
[12:19:22 pm] <rburton> where SSTATE is your sstate directory and DAYS is now many days old something needs to be before deleted
Comment 1 Michael Opdenacker 2023-08-10 15:44:06 UTC
I'm missing something...

What's the added value of the suggested command...
find $SSTATE -type f -atime +$DAYS -delete

... when the docs already suggest to use:
sstate-cache-management.sh --remove-duplicated --cache-dir=build/sstate-cache

This documented and dedicated command seems to do the job. How is the above "find" command different or better?
Comment 2 Randy MacLeod 2023-08-10 21:36:25 UTC
I suspect but haven't recently confirmed that it's simply much, much faster.
If you don't have a big sstate-cache tree around to make copies of and confirm this assertion, let me know.
Comment 3 Randy MacLeod 2023-08-10 21:38:28 UTC
Also see:
https://lists.yoctoproject.org/g/yocto/message/57052