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
Use the alias command
Safety Checks
The uninstall command includes important safety checks:
- Version Validation: Verifies the version exists and is installed
- Default Version Protection: Prevents removal of the currently active default version
- Clean Removal: Completely removes the version directory and all associated files
Error Handling
The command provides clear error messages for:
- Non-existent versions
- Attempting to remove the default version
- Permission issues during file removal
Important Notes
- Cannot remove default version: You must switch to a different version using
gvm use before removing the current default
- Permanent removal: Once uninstalled, the version must be re-downloaded if needed again
- No confirmation prompt: The command executes immediately without confirmation
Workflow Example
To safely remove a version:
- Check installed versions:
- If the version is default, switch to another:
- Remove the version:
- install - Install a new version
- list - See installed versions
- use - Switch to a different version