Back to Packer

`packer plugins remove` command reference

website/content/docs/commands/plugins/remove.mdx

1.15.32.5 KB
Original Source

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

[!IMPORTANT]
Documentation Update: Product documentation previously located in /website has moved to the hashicorp/web-unified-docs repository, where all product documentation is now centralized. Please make contributions directly to web-unified-docs, since changes to /website in this repository will not appear on developer.hashicorp.com. ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

packer plugins remove command reference

The packer plugins remove subcommand removes one or more versions of an installed Packer plugin.

The command is flexible enough to remove all versions at once or just a single version at a time.

  • If a plugin's source address is specified, without a version constraint, all the versions of that plugin will be removed.
  • If a version constraint is specified, only the specified version will be removed.
  • If a direct path to a plugin is specified, only the specified version will be removed.

Refer to the examples below for details on usage.

shell-session
To remove a plugin matching a version constraint for the current OS and architecture.

  packer plugins remove github.com/hashicorp/happycloud v1.2.3

To remove all versions of a plugin for the current OS and architecture omit the version constraint.

  packer plugins remove github.com/hashicorp/happycloud

To remove a single plugin binary from the Packer plugin directory specify the absolute path to an installed binary. This syntax does not allow for version matching.

  packer plugins remove ~/.config/plugins/github.com/hashicorp/happycloud/packer-plugin-happycloud_v1.0.0_x5.0_linux_amd64

Remove all installed plugins

The plugins remove command can be used in conjunction with the plugins installed command to remove all Packer plugins by piping the results of plugins installed to plugins removed.

On a Unix based OS with xargs installed you can remove all plugin versions using the following command:

shell-session
~>  packer plugins installed | xargs -n1 packer plugins remove
~/.config/packer/plugins/github.com/hashicorp/amazon/packer-plugin-amazon_v1.3.2_x5.0_darwin_arm64
~/.config/packer/plugins/github.com/hashicorp/azure/packer-plugin-azure_v2.1.3_x5.0_darwin_arm64