An open API service indexing awesome lists of open source software.

https://github.com/olegkron/dependency-cleaner

A shell script for easy dependencies cleanup.
https://github.com/olegkron/dependency-cleaner

cli nodejs productivity python3 shell shell-script storage utility

Last synced: 12 months ago
JSON representation

A shell script for easy dependencies cleanup.

Awesome Lists containing this project

README

          

Dependency Cleaner

A shell script to easily delete dependency folders in a given directory and its subdirectories. A great tool to free up disk space by removing unnecessary node_modules, .cache, pycache, target, venv, env, go/pkg folders.

[![Stars](https://img.shields.io/github/stars/olegkron/dependency-cleaner.svg?style=social)](https://github.com/olegkron/dependency-cleaner/stargazers) [![Forks](https://img.shields.io/github/forks/olegkron/dependency-cleaner.svg?style=social)](https://github.com/olegkron/dependency-cleaner/network/members) [![Contributors](https://img.shields.io/github/contributors/olegkron/dependency-cleaner.svg)](https://github.com/olegkron/dependency-cleaner/graphs/contributors) [![Issues](https://img.shields.io/github/issues/olegkron/dependency-cleaner.svg)](https://github.com/olegkron/dependency-cleaner/issues) [![MIT License](https://img.shields.io/github/license/olegkron/dependency-cleaner.svg)](https://github.com/olegkron/dependency-cleaner/blob/main/LICENSE)

![Output example](https://raw.githubusercontent.com/olegkron/node_modules_remover/main/output_example.png)

## πŸŽ‰ Features

- πŸ”Ž Recursively searches for the following folders in the input directory: "node_modules", ".cache", "pycache". "target", "venv". "env", "go/pkg" (any of them can be added or removed)
- πŸ“Š Displays the total size of each folder
- πŸ’½ Calculates the total space saved
- πŸ–₯️ Works on Linux and MacOS

## πŸ’» Usage

The script can be executed using the following command in the terminal:

`./dependency-cleaner.sh [directory_path] [max_depth]`

- `directory_path`: Required. The directory to search for node_modules folders.
- `max_depth`: Optional. Sets maximum depth to search for node_modules folders. Default is 3.

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=olegkron/dependency-cleaner&type=Date)](https://star-history.com/#olegkron/dependency-cleaner&Date)

## πŸ™Œ Contributing

If you have any suggestions for improvements or find any bugs, feel free to open a pull request or an issue.

## πŸ‘₯ Authors

- **Oleg Kron**Β -Β [olegkron](https://github.com/olegkron)

## πŸ“„ License

This project is licensed under the MIT License - see theΒ [LICENSE](https://github.com/olegkron/node_modules_remover/blob/main/LICENSE)Β file for details.