gvm

Uninstall Command

Remove installed Go versions from your system.

Usage

gvm uninstall [version]
gvm remove [version]

Description

The uninstall command (also available as remove) allows you to remove specific Go versions that are no longer needed. This helps free up disk space and keeps your Go installation directory clean.

Examples

Remove a specific version

gvm uninstall go1.19

Use the alias command

gvm remove go1.18

Safety Checks

The uninstall command includes important safety checks:

  1. Version Validation: Verifies the version exists and is installed
  2. Default Version Protection: Prevents removal of the currently active default version
  3. Clean Removal: Completely removes the version directory and all associated files

Error Handling

The command provides clear error messages for:

Important Notes

Workflow Example

To safely remove a version:

  1. Check installed versions:
    gvm list
    
  2. If the version is default, switch to another:
    gvm use go1.20
    
  3. Remove the version:
    gvm uninstall go1.19