---
title: "Discussion on \"How to delete build Folders in your Flutter projects using a script\" | Hashnode"
description: "Discussion on \"How to delete build Folders in your Flutter projects using a script\". The build folders in Flutter projects sometimes become so big, it eats up your storage. We will look at how to resolve this with a script."
url: "https://hashnode.com/posts/how-to-delete-build-folders-in-your-flutter-projects-using-a-script/63985574a439c4e22a7ef126"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to delete build Folders in your Flutter projects using a script](https://iametornam.hashnode.dev/how-to-delete-build-folders-in-your-flutter-projects-using-a-script?utm_source=hashnode&utm_medium=feed)

The build folders in Flutter projects sometimes become so big, it eats up your storage. We will look at how to resolve this with a script.

Dec 13, 2022 · 3 min read · iametornam.hashnode.dev  
Read the article

-   [#flutter](https://hashnode.com/tag/flutter)
-   [#script](https://hashnode.com/tag/script)
-   [#how-to](https://hashnode.com/tag/how-to)
-   [#dart](https://hashnode.com/tag/dart)
-   [#coding](https://hashnode.com/tag/coding)

## Written by

[Bright Etornam Sunu](https://hashnode.com/@iamEtornam)

@iamEtornam · Accra, Ghana

  
[View profile](https://hashnode.com/@iamEtornam)

Flutter & Dart GDE || Mobile & Backend Engineer || Technical writer || Community builder

Etornam is a Software Engineer and a Google Developer Expert(GDE) who specialises in developing resilient Mobile applications for android &amp; iOS and web services. He understands modern software engineering and is always looking for a better approach to designing software. Aside from his day-to-day activities as a software engineer, he actively contributes to open-source projects and co-organises at Flutter Africa.

## Responses 2

Markdown supported · ⌘↵ to post

[Parables Boltnoel](https://hashnode.com/@ParablesBoltnoel)

[Feb 21, 2023](https://hashnode.com/posts/how-to-delete-build-folders-in-your-flutter-projects-using-a-script/63985574a439c4e22a7ef126/comment/63f538dc75350fc1ff6914a9)

PS: a config file like `.rmclean` at the root of the project which specifies which directories and files should be deleted will ease this process.

In this case, the script scans for all directories that have this config file `.rmclean` and uses the content of the.config file to delete those files.

In the absence of this config file the script can be smart enough to guess the project type and use smart defaults to determine which directories to delete but it should prompt before executing unless explicitly executed with a flag like `-f | --force`.

This can also be executed as part of CI/CD process.

[Parables Boltnoel](https://hashnode.com/@ParablesBoltnoel)

[Feb 21, 2023](https://hashnode.com/posts/how-to-delete-build-folders-in-your-flutter-projects-using-a-script/63985574a439c4e22a7ef126/comment/63f5362ff338bec1cf2de816)

A universal script that deletes such extraneous files/directories for other projects would be great.

Another enhancement will be to make it interactive to prompt on which projects it should delete. Something like delete all build folders for all projects except project\_1 and my\_app.

Great write up
