title: You have to remove (or rename) that container to be able to reuse that name
body: <p>Metasploitable2</p>
  <pre><code>sudo docker run --name mymet2 -it tleemcjr/metasploitable2:latest sh -c &quot;/bin/services.sh &amp;&amp; bash&quot;
  </code></pre>
  <p>Got a error</p>
  <blockquote>
  <p>docker: Error response from daemon: Conflict. The container name
  &quot;/mymet2&quot; is already in use by container
  &quot;0a545a9ae45d56909fe081b52f8f2dcad524873ee4de8e73a816d60bad783852&quot;.
  You have to remove (or rename) that container to be able to reuse that
  name. See 'docker run --help'.</p>
  </blockquote>
  <pre><code>└─$ sudo docker ps -a                                                                                                           125 ⨯
  CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS                     PORTS                                                NAMES
  daa5b8f6fe52        nginx                             &quot;/docker-entrypoint.…&quot;   19 minutes ago      Created                    0.0.0.0:80-&gt;80/tcp                                   webserver
  c376d4818c32        tleemcjr/metasploitable2          &quot;sh -c '/bin/service…&quot;   2 hours ago         Created                                                                         adro
  bfa436743168        tleemcjr/metasploitable2          &quot;sh -c '/bin/service…&quot;   2 hours ago         Created                                                                         mymet1
  d8ffd4cf005f        tleemcjr/metasploitable2          &quot;sh -c '/bin/service…&quot;   2 hours ago         Created                                                                         mymet12
  e33cf540d3fa        tleemcjr/metasploitable2:latest   &quot;sh -c '/bin/service…&quot;   2 hours ago         Created                                                                         victumb-it
  0ea700a7b4ed        raesene/bwapp                     &quot;/run.sh&quot;                46 hours ago        Created                    3306/tcp, 0.0.0.0:8080-&gt;80/tcp                       pedantic_banach
  e797fef6e719        raesene/bwapp                     &quot;/run.sh&quot;                46 hours ago        Created                    3306/tcp, 0.0.0.0:8080-&gt;80/tcp                       amazing_moore
  0a545a9ae45d        tleemcjr/metasploitable2:latest   &quot;sh -c '/bin/service…&quot;   6 days ago          Exited (255) 6 days ago                                                         mymet2
  2ccb79530870        tleemcjr/metasploitable2:latest   &quot;sh -c '/bin/service…&quot;   8 days ago          Exited (255) 8 days ago                                                         container-name
  0973852bd6f1        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      8 days ago          Created                                                                         relaxed_kapitsa
  99909b81ba7a        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      8 days ago          Created                                                                         tender_clarke
  91602e02f23e        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      8 days ago          Created                                                                         focused_williamson
  8c0089ea4194        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         stupefied_merkle
  69d2e0f9d7f7        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         friendly_hoover
  a92a99cc843a        nginx                             &quot;/docker-entrypoint.…&quot;   9 days ago          Exited (255) 8 days ago    0.0.0.0:8084-&gt;80/tcp                                 friendly_faraday
  d97573916d37        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         competent_clarke
  0ef45548b679        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         busy_easley
  e31e8775a826        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         dazzling_allen
  975416a2318f        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         intelligent_wiles
  2c0bebdce7cf        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         dazzling_sinoussi
  94fb024c9fba        andresriancho/w3af:unstable       &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         silly_dhawan
  94e38b655cab        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         distracted_rhodes
  64e17ba671ff        andresriancho/w3af:unstable       &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         adoring_darwin
  56337daabc77        andresriancho/w3af:unstable       &quot;/usr/sbin/sshd -D&quot;      9 days ago          Created                                                                         epic_allen
  a8e734ef7ceb        andresriancho/w3af:latest         &quot;/usr/sbin/sshd -D&quot;      9 days ago          Exited (255) 8 days ago    22/tcp, 0.0.0.0:44444-&gt;44444/tcp                     charming_curran
  c3c24c6bffea        bkimminich/juice-shop             &quot;docker-entrypoint.s…&quot;   9 days ago          Exited (255) 9 days ago    127.10.0.1:80-&gt;3000/tcp                              juiceshop
  7459ffcf81b4        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Exited (255) 9 days ago    127.5.0.1:80-&gt;80/tcp, 3306/tcp                       bwapp
  1b07b25e9d87        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Exited (255) 9 days ago    3306/tcp, 0.0.0.0:8080-&gt;80/tcp                       musing_buck
  89866cd6c0aa        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Exited (255) 9 days ago    3306/tcp, 0.0.0.0:8080-&gt;80/tcp                       jolly_fermi
  1d09ed02ff6c        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         wizardly_tu
  4ac43bd87da8        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         wonderful_banzai
  e23377cb444c        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         reverent_kepler
  87b01ea8f0f3        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         dazzling_ramanujan
  e9c5a6804d4d        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Exited (255) 9 days ago    0.0.0.0:80-&gt;80/tcp, 3306/tcp                         determined_euler
  7b1566924992        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         optimistic_feistel
  4033540f5371        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         gracious_bardeen
  4aa2430c540f        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         crazy_lehmann
  7c6a027a3ac0        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         trusting_sanderson
  9d5b80900227        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         heuristic_lumiere
  3939529934e1        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         musing_haibt
  da614c5639b5        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         recursing_hopper
  a6bb4a836ff4        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         nifty_panini
  c058214b1966        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         strange_goldwasser
  60b9ead9dccd        raesene/bwapp                     &quot;/run.sh&quot;                9 days ago          Created                                                                         kind_agnesi
  1a15c15650b3        webgoat/goatandwolf               &quot;/bin/sh -c '/bin/ba…&quot;   10 days ago         Exited (255) 9 days ago    127.0.0.1:8080-&gt;8080/tcp, 127.0.0.1:9090-&gt;9090/tcp   focused_kare
  8f42abbc32ba        webgoat/goatandwolf               &quot;/bin/sh -c '/bin/ba…&quot;   10 days ago         Exited (255) 10 days ago   127.0.0.1:8080-&gt;8080/tcp, 127.0.0.1:9090-&gt;9090/tcp   recursing_kare
  21935b06de2b        webgoat/goatandwolf               &quot;/bin/sh -c '/bin/ba…&quot;   10 days ago         Exited (255) 10 days ago   127.0.0.1:8080-&gt;8080/tcp, 127.0.0.1:9090-&gt;9090/tcp   mystifying_shamir
  603f0ff34d1e        webgoat/goatandwolf               &quot;/bin/sh -c '/bin/ba…&quot;   10 days ago         Created                                                                         exciting_ptolemy
  c75a6482c9a1        webgoat/goatandwolf               &quot;/bin/sh -c '/bin/ba…&quot;   10 days ago         Exited (255) 10 days ago   127.0.0.1:8080-&gt;8080/tcp, 127.0.0.1:9090-&gt;9090/tcp   vibrant_cori
  </code></pre>
  <p>What does happen and how to solve the issue.</p>