Bug 15182 - Document the method to prune sstate-cache of old entries
Summary: Document the method to prune sstate-cache of old entries
Status: RESOLVED FIXED
Alias: None
Product: Development Manual
Classification: Documentation
Component: development (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 4.3
Assignee: Michael Opdenacker
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-08-04 10:54 UTC by Yoann Congal
Modified: 2023-12-15 17:33 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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