Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4559894
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:51:13+00:00 2026-05-21T17:51:13+00:00

(cross posted to boto-users ) Given an image ID, how can I delete it

  • 0

(cross posted to boto-users)

Given an image ID, how can I delete it using boto?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T17:51:14+00:00Added an answer on May 21, 2026 at 5:51 pm

    You use the deregister() API.

    There are a few ways of getting the image id (i.e. you can list all images and search their properties, etc)

    Here is a code fragment which will delete one of your existing AMIs (assuming it’s in the EU region)

    connection = boto.ec2.connect_to_region('eu-west-1', \
                                        aws_access_key_id='yourkey', \
                                        aws_secret_access_key='yoursecret', \
                                        proxy=yourProxy, \
                                        proxy_port=yourProxyPort)
    
    
    # This is a way of fetching the image object for an AMI, when you know the AMI id
    # Since we specify a single image (using the AMI id) we get a list containing a single image
    # You could add error checking and so forth ... but you get the idea
    images = connection.get_all_images(image_ids=['ami-cf86xxxx'])
    images[0].deregister()
    

    (edit): and in fact having looked at the online documentation for 2.0, there is another way.

    Having determined the image ID, you can use the deregister_image(image_id) method of boto.ec2.connection … which amounts to the same thing I guess.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there some reasonably cross platform way to create a thumbnail image given a
Note: I've cross-posted this question in the grails-user mailing list This weekend using this
I am using a cross page postback for Page A to pass data to
[cross posted again to Mahalo answers] My Perl/Tk script has an initial spreadsheet like
[Cross-posted from lib-curl mailing list] I have a single threaded app (MSVC C++ 2005)
This is already cross-posted at MS Connect: https://connect.microsoft.com/VisualStudio/feedback/details/560451 I am attempting to override the
First, I'll admit this is cross-posted at SuperUser but I decided to also post
It is a cross threaded operation in windows application done in c#, How can
I am using some cross platform stuff called nutcracker to go between Windows and
I have an app built using Visual Studio 2005, which can run rpt files.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.