Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to clear the pre-commit caches?

The ~/.cache/pre-commit/ folder is many GB large, how do I clean it?

  • Can I simply delete it?
  • Or at least delete all the files?
  • Or do I have to be selective about it?
  • Is there a command for cleaning it up?

Going into every single repository and executing some command there is not an option:

  • I got a lot of repositories checked out, I’m not going to go through all of them.
  • Some cached data refers to repositories long ago deleted, so there’s no place where I could execute a command.

The README file in the folder says:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

This directory is maintained by the pre-commit project.
Learn more: https://github.com/pre-commit/pre-commit

However, I cannot find information if and what data can be deleted.

>Solution :

pre-commit has two builtin commands to handle caches:

both of these are listed in pre-commit --help — the standard way to ask a tool for what commands / options it supports


disclaimer: I wrote pre-commit

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading