# API Questions: --rm flag and service image

**URL:** <https://forums.suse.com/t/api-questions-rm-flag-and-service-image/2964>\
**Category:** General\
**Created:** [May 31, 2016, 1:37am UTC](https://forums.suse.com/t/api-questions-rm-flag-and-service-image/2964 "2016-05-31T01:37:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![etc](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/etc/32/1380_2.png) [@etc](https://forums.suse.com/u/etc)\
**Post date:** [May 31, 2016, 1:37am UTC](https://forums.suse.com/t/api-questions-rm-flag-and-service-image/2964/1 "2016-05-31T01:37:41Z")

</div>

#start specific image

[http://docs.rancher.com/rancher/latest/en/api/api-resources/service/](http://docs.rancher.com/rancher/latest/en/api/api-resources/service/)

I’m sorry if this is a really beginner question, but api parameter sets the name of the image (and label) I’m trying to start?

# –rm flag

I did not locate anything that would allow me to declare equivalent to this:

```
--rm=false Automatically remove the container when it exits

```

[http://docs.rancher.com/rancher/latest/en/api/api-resources/launchConfig/](http://docs.rancher.com/rancher/latest/en/api/api-resources/launchConfig/)

Am I missing something? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![etc](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/etc/32/1380_2.png) [@etc](https://forums.suse.com/u/etc)\
**Post date:** [May 31, 2016, 10:00pm UTC](https://forums.suse.com/t/api-questions-rm-flag-and-service-image/2964/2 "2016-05-31T22:00:52Z")

</div>

Through some testing, I figured out the ImageUuid was the proper parameter.

I’m still looking for the equivalent to the --rm flag, though. Thanks!

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [June 2, 2016, 3:14am UTC](https://forums.suse.com/t/api-questions-rm-flag-and-service-image/2964/3 "2016-06-02T03:14:37Z")

</div>

I don’t believe we have implemented `--rm` into Rancher at this time.

Please feel free to make an enhancement request in [Github](https://github.com/rancher/rancher/issues).

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [June 2, 2016, 7:20pm UTC](https://forums.suse.com/t/api-questions-rm-flag-and-service-image/2964/4 "2016-06-02T19:20:06Z")

</div>

It’s not implemented because it’s not actually part of the docker remote API; the CLI makes a separate call to delete after the container exits.

---

<div class="post-metadata">

**Author:** ![etc](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/etc/32/1380_2.png) [@etc](https://forums.suse.com/u/etc)\
**Post date:** [June 2, 2016, 11:36pm UTC](https://forums.suse.com/t/api-questions-rm-flag-and-service-image/2964/5 "2016-06-02T23:36:43Z")

</div>

Aha! Thanks for the clarification.

Do you have a suggested design pattern to replicate this behavior? I’m trying to start up instances of a site speed analyzer on demand and would like to keep the disk tidy after completion.
