omni
omni copied to clipboard
Feature: `omni tidy` should clean the cache
If a repository is simply deleted without calling omni down, its cached information are kept.
If omni up is ran in a random repository, leading to the use of .omni/id, its cached information are kept after deletion too.
We want to be able to clean the cache, and of course remove all the installed tools that are not necessary anymore.
Since calling omni tidy already lists all the repositories, we would need to:
- add support for handling
.omni/iddirectories when usingomni tidy - store a
last upinformation for all workdir ids - make the inventory of all repository ids seen when using
omni tidy - compare that inventory with the cached repository ids
- automatically remove from the cache all ids for which the
last upinformation is older than N (could default to something between 30 and 90 days, and provide a configuration parameter)
This would be a safe approach since not too invasive thanks to the grace period before deletion.