Managing SDK Components

What are components?

Components are the installable parts of the SDK. A component can be a command-line tool (gcloud, bq and gsutil), a set of gcloud CLI commands at the Alpha or Beta release levels, or a package that contains dependencies used by a tool in the SDK.

The most commonly-used components are installed by default. If you run a gcloud alpha or gcloud beta command interactively and the alpha or beta component is not installed, the gcloud CLI asks you whether you want to install it. An affirmative response installs the component and then runs the command. Other components are installed on-demand by the gcloud CLI when you run commands that require them.

Default components

When you install the SDK, the following components are installed by default:

ID Name Description
gcloud Default gcloud CLI Commands Tool for interacting with Google Cloud Platform. Only commands at the General Availability and Preview release levels are installed with this component. You must separately install the gcloud alpha Commands and/or gcloud beta Commands components if you want to use commands at other release levels.
bq BigQuery Command-Line Tool Tool for working with data in Google BigQuery
gsutil Cloud Storage Command-Line Tool Tool for performing tasks related to Google Cloud Storage.
core Cloud SDK Core Libraries Libraries used internally by the SDK tools.

Alpha and Beta components

The SDK provides two components that contain gcloud CLI Alpha and Beta commands. These components are not installed by default, but you can install them manually at any time after the initial SDK installation. These components are:

ID Name Description
alpha gcloud CLI Alpha Commands gcloud CLI commands at the Alpha release level.
beta gcloud CLI Beta Commands gcloud CLI commands at the Beta release level.

gcloud CLI commands at the General Availability and Preview release levels are part of the gcloud CLI component and are installed automatically when you install the SDK.

A list of all available additional components and external package managers (not installed by default) is available below.

Managing Cloud SDK Components

You can list, install, update and remove Google Cloud SDK components to suit your needs.

Listing components

To see a list of components that are available and currently installed, run gcloud components list:

gcloud components list
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                  Components                                          │
├───────────────┬───────────────────────────────────────────────┬──────────────────────────┬───────────┤
│     Status    │                         Name                  │            ID            │    Size   │
├───────────────┼───────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Installed     │ App Engine Go Extensions                      │ app-engine-go            │  97.7 MiB │
│ Installed     │ Cloud Bigtable Command Line Tool              │ cbt                      │   4.0 MiB │
│ Installed     │ Cloud Bigtable Emulator                       │ bigtable                 │   3.8 MiB │
│ Installed     │ Cloud Datalab Command Line Tool               │ datalab                  │   < 1 MiB │
│ Installed     │ Cloud Datastore Emulator                      │ cloud-datastore-emulator │  17.8 MiB │
│ Installed     │ Cloud Datastore Emulator (Legacy)             │ gcd-emulator             │  38.1 MiB │
│ Installed     │ Cloud Pub/Sub Emulator                        │ pubsub-emulator          │  33.2 MiB │
│ Installed     │ Emulator Reverse Proxy                        │ emulator-reverse-proxy   │  14.5 MiB │
│ Installed     │ Google Cloud Build Local Builder              │ cloud-build-local        │   4.4 MiB │
│ Installed     │ gcloud app Java Extensions                    │ app-engine-java          │ 118.9 MiB │
│ Installed     │ gcloud app PHP Extensions                     │ app-engine-php           │  21.9 MiB │
│ Installed     │ gcloud app Python Extensions (Extra Libraries)│ app-engine-python-extras │  27.8 MiB │
│ Installed     │ kubectl                                       │ kubectl                  │  12.2 MiB │
│ Installed     │ BigQuery Command Line Tool                    │ bq                       │   < 1 MiB │
│ Installed     │ Cloud SDK Core Libraries                      │ core                     │   7.2 MiB │
│ Installed     │ Cloud Storage Command Line Tool               │ gsutil                   │   3.3 MiB │
│ Installed     │ gcloud Alpha Commands                         │ alpha                    │   < 1 MiB │
│ Installed     │ gcloud Beta Commands                          │ beta                     │   < 1 MiB │
│ Installed     │ gcloud app Python Extensions                  │ app-engine-python        │   6.1 MiB │
└───────────────┴───────────────────────────────────────────────┴──────────────────────────┴───────────┘

Note, the output displayed above is not a complete listing of all available components. To view the latest component offerings, update your Cloud SDK installation and run gcloud components list.

Installing components

To install a component at the current version of your Cloud SDK installation, run gcloud components install:

gcloud components install [COMPONENT-ID]

The gcloud CLI installs the specified component.

For example, if you want to install the kubectl command:

gcloud components install kubectl

Updating components

Use the gcloud components update command to update all installed components to the latest available version of Cloud SDK:

gcloud components update

If you have an older version of Cloud SDK installed, the gcloud CLI updates all the installed components.

If you'd need to revert to a previously known good version, and installed the SDK directly (outside of a package manager, including via the interactive installer, static versions, Windows installer, or Homebrew), you can use gcloud components update to revert to the specified version:

gcloud components update --version VERSION

For downgrading versions of Cloud SDK installed via a package manager, refer to these instructions for specifying versions when downloading via apt-get or yum.

Removing components

Use the gcloud components remove command to remove a specified component by its ID:

gcloud components remove [COMPONENT-ID]

You can re-install a component using the gcloud components install command at any time.

Additional components

Additional components that contain dependencies for various gcloud CLI commands are also available in the SDK, but not installed by default. One can Run $ gcloud components list for an exhaustive list of components. Additional components that can be installed will be marked with the status Not Installed.

External package managers

If you installed the Cloud SDK through the apt or yum package managers, you can also install additional Cloud SDK components using those same package managers. If your package manager cannot find these packages, read the installing with apt or installing with yum guides to learn how to configure https://packages.cloud.google.com/ as a package source.

Cloud SDK Component APT Package YUM Package
app-engine-go google-cloud-sdk-app-engine-go google-cloud-sdk-app-engine-go
app-engine-java google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-java
app-engine-python google-cloud-sdk-app-engine-python google-cloud-sdk-app-engine-python
bigtable google-cloud-sdk-bigtable-emulator google-cloud-sdk-bigtable-emulator
cbt google-cloud-sdk-cbt google-cloud-sdk-cbt
cloud-build-local google-cloud-sdk-cloud-build-local google-cloud-sdk-cloud-build-local
datalab google-cloud-sdk-datalab google-cloud-sdk-datalab
docker-credential-gcr Not yet available. Not yet available.
gcd-emulator google-cloud-sdk-datastore-emulator google-cloud-sdk-datastore-emulator
kubectl kubectl kubectl
pubsub-emulator google-cloud-sdk-pubsub-emulator google-cloud-sdk-pubsub-emulator
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud SDK Documentation