ec2removeimg(1)
β¨ NAME β¨
okay so bestie, this is ec2removeimg(1) from the General Commands Manual, and it's literally the glow-up helper for removing images in EC2. That's the vibe. π
πΈ SYNOPSIS πΈ
ec2removeimg [option]
π DESCRIPTION π
ec2removeimg removes an image in EC2 by deregistering the AMI and deleting the associated snapshot. iconic behavior, no cap. π¦
π OPTIONS π
-a,--accountACCOUNT_NAME β tells the program which account to use to connect to EC2. The account is specified in the config file~/.ec2utils.conf, as a section with[account-ACCOUNT_NAME]delimiter. The options of the sections are:access_key_idsecret_access_keyssh_key_nameandssh_private_key. This allows the program to connect to EC2. If theaccess_key_idand/orsecret_access_keyare not found in~/.ec2utils.conf, the search will useACCOUNT_NAMEto look for a matching section[profile ACCOUNT_NAME]in~/.aws/configor[ACCOUNT_NAME]in~/.aws/credentials. Only theaccess_key_idandsecret_access_keyoptions are used by this tool. π--access-idAWS_ACCESS_KEY β specifies the AWS access key and overrides the value given for the account with theaccess_key_idin the configuration file. π³--allβ deletes all images that match the criteria for image lookup. By default the tool will only delete an image if there is a singular match. so yes, this is the "go off, delete the whole matching set" button. π₯-n,--dry-runβ the program will not perform any action. It will provide information on stdout about the actions it would perform. perfect for a little look-see before the real thing. π-f,--fileCONFIG_FILE β specifies the configuration file to use. The default is~/.ec2utils.conf. ποΈ--image-idAMI_ID β specify the AMI ID of the image to be removed. This option is mutually exclusive with the--image-name,--image-name-frag, and--image-name-match. pick one selector, bestie. π―--image-nameIMAGE_NAME β specify the name of the image to be removed. The program will look for an exact match of the name. This option is mutually exclusive with--image-id,--image-name-frag, and--image-name-match. exact-name energy. β¨--image-name-fragIMAGE_NAME_FRAGMENT β specify a section of an image name for the image(s) to be removed. Every image that matches the name fragment will be removed. This option is mutually exclusive with--image-id,--image-name, and--image-name-match. fragment hunting, lowkey powerful. π§--image-name-matchREGEX β specify a regular expression to match an image name. Every image matching the regular expression will be removed. This option is mutually exclusive with--image-id,--image-name, and--image-name-frag. regex girlies rise. π--no-confirmβ delete the image without waiting for confirmation input. This will only delete the image without confirmation if there is a unique match of the image selection criteria given or if the--alloption is specified, all matches will be deleted. proceed with intention, okay? π--preserve-snapβ this option will preserve the snapshot associated with the AMI. keep the little snapshot safe. π«Ά-r,--regionsEC2_REGIONS β a comma separated list of Amazon EC2 regions, or a single region. If no region argument is specified all EC2 connected regions will be processed. EC2 disconnected regions have different API keys and thus the specified account would not work with the disconnected regions. If a disconnected region is to be processed specify the region explicitly on the command line, and only the region of interest along with the matching account. π-s,--secret-keyAWS_SECRET_KEY β specifies the AWS secret access key and overrides the value given for the account with thesecret_access_keyin the configuration file. π€«--verboseβ print extra output about the operations performed to STDOUT. give me the lore. π£--versionβ print the version of the program. π
π¦ EXAMPLE π¦
ec2removeimg --account example --image-name-match v15 --all --no-confirm --verbose
Will delete all images in all connected regions that match the v15 regular expression in the image name. All associated snapshots will be deleted as well, no confirmation of the delete operation is required by the user and progress will be written to STDOUT. ate that. π
π₯
π AUTHOR π
SUSE Public Cloud Team (public-cloud-dev@susecloud.net) β icons only. π«Ά
okay that's the whole ec2removeimg(1) page from the General Commands Manual β the footer has no extra version or date to flex, so we're done, bestie π
π
π¦ where this page comes from
- opensuse-leap 16.0: python313-ec2imgutils 10.0.3-bp160.1.11 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms