github.com/hashicorp/packer@v1.14.3/website/content/docs/commands/plugins/remove.mdx (about)

     1  ---
     2  description: |
     3    The `packer plugins remove` command removes one or more versions of an installed Packer plugin.
     4  page_title: packer plugin remove command reference
     5  ---
     6  
     7  # `packer plugins remove` command reference
     8  
     9  The `packer plugins remove` subcommand removes one or more versions of an installed Packer plugin.
    10  
    11  The command is flexible enough to remove all versions at once or just a single version at a time. 
    12  - If a plugin's source address is specified, without a version constraint, all the versions of that plugin will be removed.
    13  - If a version constraint is specified, only the specified version will be removed.
    14  - If a direct path to a plugin is specified, only the specified version will be removed.
    15  
    16  Refer to the examples below for details on usage.
    17  ```shell-session
    18  To remove a plugin matching a version constraint for the current OS and architecture.
    19  
    20    packer plugins remove github.com/hashicorp/happycloud v1.2.3
    21  
    22  To remove all versions of a plugin for the current OS and architecture omit the version constraint.
    23  
    24    packer plugins remove github.com/hashicorp/happycloud
    25  
    26  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.
    27  
    28    packer plugins remove ~/.config/plugins/github.com/hashicorp/happycloud/packer-plugin-happycloud_v1.0.0_x5.0_linux_amd64
    29  ```
    30  
    31  ## Remove all installed plugins
    32  The `plugins remove` command can be used in conjunction with the `plugins installed` command to remove all
    33  Packer plugins by piping the results of `plugins installed` to `plugins removed`. 
    34  
    35  On a Unix based OS with xargs installed you can remove all plugin versions using the following command:
    36  ```shell-session
    37  ~>  packer plugins installed | xargs -n1 packer plugins remove
    38  ~/.config/packer/plugins/github.com/hashicorp/amazon/packer-plugin-amazon_v1.3.2_x5.0_darwin_arm64
    39  ~/.config/packer/plugins/github.com/hashicorp/azure/packer-plugin-azure_v2.1.3_x5.0_darwin_arm64
    40  ```
    41  
    42  ## Related
    43  
    44  - [`packer init`](/packer/docs/commands/init) will install all required plugins.
    45  - [`packer plugins install`](/packer/docs/commands/plugins/install) will install a single plugin.