</span></code></pre></div><h3id=remove-the-container>Remove the container<aclass=headerlinkhref=#remove-the-containertitle="Permanent link">¶</a></h3><p>Once the container has been stopped, remove it.</p><divclass="admonition warning"><pclass=admonition-title>Warning</p><p>Did you remember to persist the <code>/config</code> volume when you originally created the container? Bear in mind, you'll lose any configuration inside the container if this volume was not persisted. <ahref=../volumes/>Read up on why this is important</a>.</p></div><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-1-1><aid=__codelineno-1-1name=__codelineno-1-1href=#__codelineno-1-1></a>docker<spanclass=w></span>rm<spanclass=w></span><container_name>
</span></code></pre></div><h3id=pull-the-latest-version>Pull the latest version<aclass=headerlinkhref=#pull-the-latest-versiontitle="Permanent link">¶</a></h3><p>Now you can pull the latest version of the application image from Docker Hub.</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-2-1><aid=__codelineno-2-1name=__codelineno-2-1href=#__codelineno-2-1></a>docker<spanclass=w></span>pull<spanclass=w></span>linuxserver/<image_name>
</span></code></pre></div><h3id=recreate-the-container>Recreate the container<aclass=headerlinkhref=#recreate-the-containertitle="Permanent link">¶</a></h3><p>Finally, you can recreate the container. This is often cited as the most arduous task as it requires you to remember all of the mappings you set beforehand. You can help mitigate this step by using Docker Compose instead - this topic has been <ahref=../docker-compose/>outlined in our documentation</a>.</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-3-1><aid=__codelineno-3-1name=__codelineno-3-1href=#__codelineno-3-1></a>docker<spanclass=w></span>create<spanclass=w></span><spanclass=se>\</span>
</span></code></pre></div><h2id=docker-compose>Docker Compose<aclass=headerlinkhref=#docker-composetitle="Permanent link">¶</a></h2><p>It is also possible to update a single container using Docker Compose:</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-4-1><aid=__codelineno-4-1name=__codelineno-4-1href=#__codelineno-4-1></a>docker-compose<spanclass=w></span>pull<spanclass=w></span>linuxserver/<image_name>
</span></code></pre></div><p>Or, to update all containers at once:</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-5-1><aid=__codelineno-5-1name=__codelineno-5-1href=#__codelineno-5-1></a>docker-compose<spanclass=w></span>pull
</span></code></pre></div><h2id=removing-old-images>Removing old images<aclass=headerlinkhref=#removing-old-imagestitle="Permanent link">¶</a></h2><p>Whenever a Docker image is updated, a fresh version of that image gets downloaded and stored on your host machine. Doing this, however, does not remove the <em>old</em> version of the image. Eventually you will end up with a lot of disk space used up by stale images. You can <code>prune</code> old images from your system, which will free up space:</p><divclass="language-shell highlight"><pre><span></span><code><spanid=__span-6-1><aid=__codelineno-6-1name=__codelineno-6-1href=#__codelineno-6-1></a>docker<spanclass=w></span>image<spanclass=w></span>prune