https://github.com/glensc/system-cache-prune
Clear caches from the system
https://github.com/glensc/system-cache-prune
Last synced: 2 months ago
JSON representation
Clear caches from the system
- Host: GitHub
- URL: https://github.com/glensc/system-cache-prune
- Owner: glensc
- License: mit
- Created: 2020-06-12T18:09:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-04T13:30:59.000Z (4 months ago)
- Last Synced: 2025-02-04T14:34:46.517Z (4 months ago)
- Language: Shell
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# system-cache-prune
Clear caches from the system.
This tool is intended to cleanup various caches on machine where free
disk availability is regularly critical.I got tried of remembering which command does the cleanup, is it
- `yarn cache-clear`, `yarn clear-cache`, `yarn clear cache`?
- `composer clean cache`?so I wrote this script and polished it.
## Usage
```
$ system-cache-prune.sh
$ system-cache-prune.sh subsystem1 subsystem2
```## Subsystems
- [brew]: Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae.
- [composer]: Deletes all content from Composer's cache directories.
- [docker]: Remove all unused containers, images (both dangling and unreferenced).
- [npm]: Delete all data out of the cache folder.
- [yarn]: Remove the shared cache files.
- [docker:disk-image]: Compact `Docker.raw` or `Docker.qcow2` to return space to the OS.[brew]: https://docs.brew.sh/FAQ#how-do-i-uninstall-old-versions-of-a-formula
[composer]: https://getcomposer.org/doc/03-cli.md#clear-cache-clearcache-cc
[docker]: https://docs.docker.com/engine/reference/commandline/system_prune/
[docker:disk-image]: https://docs.docker.com/docker-for-mac/space/
[yarn]: https://yarnpkg.com/cli/cache/clean
[npm]: https://docs.npmjs.com/cli-commands/cache.html