packer plugins remove 커맨드 참조

packer plugins remove 커맨드 참조 (packer plugins remove command reference)

packer plugins remove 서브커맨드는 설치된 Packer 플러그인의 한 개 이상의 버전을 제거해요.

출처: Packer 공식 문서

본문

이 커맨드는 한 번에 모든 버전을 제거하거나, 단일 버전만 제거할 만큼 유연해요.

  • 플러그인의 소스 주소(source address)가 버전 제약 없이 지정되면, 해당 플러그인의 모든 버전이 제거돼요.
  • 버전 제약이 지정되면, 지정된 버전만 제거돼요.
  • 플러그인에 대한 직접 경로가 지정되면, 지정된 버전만 제거돼요. 사용법에 대한 자세한 내용은 아래 예시를 참고하세요.
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 (설치된 모든 플러그인 제거)

plugins remove 커맨드는 plugins installed 커맨드와 함께 쓰면 모든 Packer 플러그인을 제거할 수 있어요. plugins installed의 결과를 plugins removed로 파이프하면 돼요.

xargs가 설치된 Unix 기반 OS에서는 다음 커맨드로 모든 플러그인 버전을 제거할 수 있어요.

~>  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
  • packer init 커맨드는 필요한 모든 플러그인을 설치해요.
  • packer plugins install 커맨드는 단일 플러그인을 설치해요.

더 알아보기 (Learn more)