1.1 KiB
1.1 KiB
GCP Project Cleaner
A simple CLI tool to bulk delete GCP projects.
Prerequisites
- Node.js (v18 or higher)
- pnpm
- Google Cloud SDK (gcloud) authenticated with
gcloud auth login.
Usage
-
Install dependencies:
pnpm install -
Run the script:
pnpm start
Features
- Authentication Check: Verifies if you are authenticated with
gcloud. - Interactive Selection: Choose multiple projects to delete using an interactive checkbox list.
- Project Age Highlighting: Projects are color-coded based on their age (Green: <30 days, Yellow: >30 days, Red: >1 year).
- Safe Confirmation: Requires explicit confirmation before any deletion occurs.
- Bulk Execution: Deletes selected projects sequentially and logs the status.
Note on Deletion
GCP projects are usually "scheduled for deletion" and remain in a "Pending Deletion" state for 30 days before being permanently removed. You can restore them within this period if needed.