Skip to content

Four cloud command-line tools came to 1.1 GB, and gcloud was half of it

The AWS, Google Cloud, Firebase and Vercel CLIs each ship their own runtime. Measured at 1.05 GB, with gcloud alone at 533 MB.

4 min read

Cloud CLIs look like small commands. Each is a full application underneath: the AWS CLI bundles Python, gcloud bundles Python and builds a virtual environment, and the npm-based ones carry a dependency tree.

ToolWhereSize
Google Cloud SDK/opt/homebrew/share/google-cloud-sdk442 MB
gcloud's virtualenv~/.config/gcloud/virtenv91 MB
AWS CLI/usr/local/aws-cli217 MB
Firebase CLIglobal npm package154 MB
Vercel CLIglobal npm package148 MB

gcloud grows with components

The Google Cloud SDK installs optional components, such as emulators, kubectl and the App Engine runtimes, into its own folder. Each can be hundreds of megabytes.

gcloud components list --only-local-state
gcloud components remove <component-id>

Find yours

which -a gcloud aws firebase vercel az doctl flyctl 2>/dev/null
du -sh /opt/homebrew/share/google-cloud-sdk /usr/local/aws-cli ~/.config/gcloud 2>/dev/null

Keeping them light

  • Remove CLIs for clouds you no longer deploy to. Credentials in ~/.aws, ~/.config/gcloud and similar are tiny; the runtime is what costs.
  • Use npx for occasional ones. npx vercel is fine for a monthly deploy. The cost of that is in the npx cache.
  • Emulators such as Firebase's download Java and emulator binaries on first use, which is where the Firebase CLI gets heavier.

Infrastructure tools have their own caches: Terraform and local Kubernetes clusters.

Common questions

How big is the Google Cloud SDK on a Mac?

On the Mac measured, 442 MB installed through Homebrew plus a 91 MB virtual environment in ~/.config/gcloud. Extra components add more.

How big is the AWS CLI on a Mac?

217 MB on the Mac measured, in /usr/local/aws-cli, because it bundles its own Python.

How do I remove gcloud components I do not use?

List them with gcloud components list --only-local-state and remove one with gcloud components remove.

Is it safe to delete ~/.config/gcloud/virtenv?

Yes. gcloud recreates the virtual environment when it needs it. Keep the rest of ~/.config/gcloud, which holds your credentials.

Read next