{"id":17005411,"url":"https://github.com/andreialecu/yarn-cache-remover","last_synced_at":"2025-10-18T08:24:53.799Z","repository":{"id":57403236,"uuid":"351173279","full_name":"andreialecu/yarn-cache-remover","owner":"andreialecu","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-26T10:11:05.000Z","size":21652,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T10:07:28.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreialecu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-24T17:49:19.000Z","updated_at":"2023-01-17T19:19:52.000Z","dependencies_parsed_at":"2022-09-18T12:11:30.907Z","dependency_job_id":null,"html_url":"https://github.com/andreialecu/yarn-cache-remover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreialecu/yarn-cache-remover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Fyarn-cache-remover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Fyarn-cache-remover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Fyarn-cache-remover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Fyarn-cache-remover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreialecu","download_url":"https://codeload.github.com/andreialecu/yarn-cache-remover/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Fyarn-cache-remover/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260660478,"owners_count":23043510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T04:46:19.505Z","updated_at":"2025-10-18T08:24:53.704Z","avatar_url":"https://github.com/andreialecu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yarn-cache-remover\n\n## EXPERIMENTAL! USE AT YOUR OWN RISK!\n\nThis will nuke `.yarn/cache` out of existence from a git repository.\n\nIt uses [BFG Repo Cleaner](https://rtyley.github.io/bfg-repo-cleaner/) and rewrites history, so use at your own risk.\n\nIt works by first cloning a repo with the `--mirror` flag into a temp path. It will then compute a list of git object ids of files in `.yarn/cache` and delete them.\n\n### Usage:\n```\nyarn dlx yarn-cache-remover git@github.com:myorg/myrepo.git --outDir /tmp/berry-no-cache\n```\n\nThe pruned repository will be stored in `\u003coutDir\u003e/repo-mirror`.\n\nYou can also specify multiple cache paths to prune:\n```\nyarn dlx yarn-cache-remover git@github.com:myorg/myrepo.git --cachePath .yarn/cache -cachePath other/someproj/.yarn/cache --outDir /tmp/berry-no-cache\n```\n\n### Example output:\n```\nDownloading BFG...\nCloning into bare repository 'repo-mirror'...\nremote: Enumerating objects: 525, done.\nremote: Counting objects: 100% (525/525), done.\nremote: Compressing objects: 100% (396/396), done.\nremote: Total 96534 (delta 301), reused 247 (delta 123), pack-reused 96009\nReceiving objects: 100% (96534/96534), 1.23 GiB | 15.80 MiB/s, done.\nResolving deltas: 100% (55647/55647), done.\nGetting blobs related to .yarn/cache/*\nFound 10610 blobs to delete.\nRemoving blobs, do not intrerrupt this process.\n  In total, 17684 object ids were changed. Full details are logged here:\n        /private/tmp/berry-no-cache/repo-mirror.bfg-report/2021-03-24/19-42-03\n  BFG run is complete! When ready, run: git reflog expire --expire=now --all \u0026\u0026 git gc --prune=now --aggressive\nDone removing blobs.\nRepository size before: 1.24 GiB\nPruning repo... please wait, this may take a while\nRepository size after: 123.92 MiB\n\nGo to /tmp/berry-no-cache/repo-mirror and inspect the changes then push it, if desired. Remember that it's a mirror, so the files will not be visible. Git commands should work though.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreialecu%2Fyarn-cache-remover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreialecu%2Fyarn-cache-remover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreialecu%2Fyarn-cache-remover/lists"}