Skip to content

olegkron/dependency-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 Forks Contributors Issues MIT License

Output example

🎉 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

🙌 Contributing

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

👥 Authors

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.