flutter_clear 0.1.0 copy "flutter_clear: ^0.1.0" to clipboard
flutter_clear: ^0.1.0 copied to clipboard

A powerful command-line tool designed to automatically scan directories for Flutter projects and execute `flutter clean` on each one, helping developers reclaim valuable disk space and maintain clean [...]

๐Ÿงน Flutter Clear (flutter_clear) #

A powerful command-line tool designed to automatically scan directories for Flutter projects and execute flutter clean on each one, helping developers reclaim valuable disk space and maintain clean development environments.

๐Ÿš€ The Problem #

As a Flutter developer, you've likely experienced this frustrating scenario:

  • Low device storage warnings constantly interrupting your workflow
  • Multiple Flutter projects consuming gigabytes of disk space
  • Build directories growing to hundreds of megabytes or even several gigabytes per project
  • The tedious process of manually running flutter clean on each project individually

Flutter's build process generates significant intermediate files, compiled code, and platform-specific assets in directories like build/, .dart_tool/, and iOS/Android build folders. While these files are essential during development, they accumulate over time and can consume 20GB or more of storage across multiple projects.

In my case it consumed more than 64gb of space

๐Ÿ’ก The Solution #

flutter_clear automates the cleanup process by:

โœ… Automatically scanning directories to identify Flutter projects (by detecting pubspec.yaml files)
โœ… Running flutter clean on each discovered project simultaneously
โœ… Shows totol projects found in the directory provided
โœ… Showing the cleaning progress during the cleanup operation
โœ… Supporting recursive directory scanning for nested project structures

alt text

๐Ÿ“ฆ Installation #

Install Flutter Clear globally for system-wide access:

# Install from pub.dev
dart pub global activate flutter_clear

# Install from GitHub (latest development version)  
dart pub global activate -s git https://github.com/thisisprabhat/flutter_clear.git

Local Installation

For development or local usage:

# Clone the repository
git clone https://github.com/thisisprabhat/flutter_clear.git
cd flutter_clear

# Install dependencies  
dart pub get

# Activate locally
dart pub global activate --source path .

๐Ÿ› ๏ธ Usage #

Basic Usage

# Clean Flutter projects in current directory and all subdirectories just by running the following command
flutter_clear

๐Ÿ”’ Safety Note: Only regeneratable files are removed. Your source code, assets, configuration files, and any custom modifications remain completely untouched.

๐Ÿ“Š Comparison with Alternatives #

Feature Flutter Clear Manual Process IDE Tools
Batch Processing โœ… All projects at once โŒ One by one โš ๏ธ Limited
Space Reporting โœ… Detailed analysis โŒ Manual calculation โŒ Not available
Safety Checks โœ… Dry run & confirmation โš ๏ธ Manual verification โš ๏ธ Variable
Cross-Platform โœ… All platforms โš ๏ธ OS-dependent commands โš ๏ธ IDE-specific
Automation Ready โœ… CI/CD compatible โŒ Requires scripting โŒ Manual only
Speed โšก Parallel processing ๐ŸŒ Sequential โšก Fast (single project)
1
likes
140
points
135
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

A powerful command-line tool designed to automatically scan directories for Flutter projects and execute `flutter clean` on each one, helping developers reclaim valuable disk space and maintain clean development environments.

Repository (GitHub)

Topics

#cli #clean #dev #console

Documentation

API reference

License

MIT (license)

Dependencies

colored_log

More

Packages that depend on flutter_clear