Skip to content

feat: support uninstalling multiple versions (#449) - #481

Merged
Zordrak merged 3 commits into
masterfrom
feat/449-multi-uninstall
Apr 24, 2026
Merged

Zordrak merged 3 commits into
masterfrom
feat/449-multi-uninstall

Conversation

@Zordrak

@Zordrak Zordrak commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

tfenv uninstall now accepts multiple version arguments:

tfenv uninstall 1.5.0 1.6.0 1.7.0

Each version is processed independently in a subshell — if one fails, the remaining versions are still uninstalled and the command exits nonzero at the end.

Changes:

  • libexec/tfenv-uninstall: Refactored into uninstall_single_version() function called in a loop. Accepts $@ instead of single arg.
  • libexec/tfenv-help: Updated usage description.
  • test/test_uninstall.sh: New test case installs 3 versions, uninstalls 2 in one command, verifies the third remains.

Backward compatible: Single-version uninstall behaviour is unchanged. No-arg behaviour (version file / TFENV_TERRAFORM_VERSION) is unchanged.

Fixes #449

tfenv uninstall now accepts multiple version arguments:

  tfenv uninstall 1.5.0 1.6.0 1.7.0

Each version is processed independently - if one fails, the
remaining versions are still uninstalled and the command exits
nonzero at the end.

Single-version uninstall behaviour is unchanged. When called with
no arguments, the version file or TFENV_TERRAFORM_VERSION is still
used as before.

Fixes #449
Zordrak added 2 commits April 24, 2026 16:55
…stall

# Conflicts:
#	libexec/tfenv-uninstall
…stall

# Conflicts:
#	libexec/tfenv-uninstall
@Zordrak
Zordrak merged commit 3f044fd into master Apr 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the option to uninstall several versions

1 participant