<!doctype html><htmllang=enclass=no-js><head><metacharset=utf-8><metaname=viewportcontent="width=device-width,initial-scale=1"><metaname=descriptioncontent="Welcome to the home of the LinuxServer.io documentation!"><metaname=authorcontent=LinuxServer.io><linkhref=https://docs.linuxserver.io/general/updating-our-containers/rel=canonical><linkhref=../understanding-puid-and-pgid/rel=prev><linkhref=../volumes/rel=next><linkrel=iconhref=../../assets/favicon.ico><metaname=generatorcontent="mkdocs-1.5.3, mkdocs-material-9.4.6"><title>Updating our containers - LinuxServer.io</title><linkrel=stylesheethref=../../assets/stylesheets/main.35e1ed30.min.css><linkrel=stylesheethref=../../assets/stylesheets/palette.356b1318.min.css><linkrel=preconnecthref=https://fonts.gstatic.comcrossorigin><linkrel=stylesheethref="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback"><style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style><script>__md_scope=newURL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script></head><bodydir=ltrdata-md-color-scheme=defaultdata-md-color-primary=purpledata-md-color-accent=indigo><script>varpalette=__md_get("__palette");if(palette&&"object"==typeofpalette.color)for(varkeyofObject.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script><inputclass=md-toggledata-md-toggle=drawertype=checkboxid=__drawerautocomplete=off><inputclass=md-toggledata-md-toggle=searchtype=checkboxid=__searchautocomplete=off><labelclass=md-overlayfor=__drawer></label><divdata-md-component=skip><ahref=#updating-our-containersclass=md-skip> Skip to content </a></div><divdata-md-component=announce></div><headerclass=md-headerdata-md-component=header><navclass="md-header__inner md-grid"aria-label=Header><ahref=../..title=LinuxServer.ioclass="md-header__button md-logo"aria-label=LinuxServer.iodata-md-component=logo><imgsrc=../../assets/icon.svgalt=logo></a><labelclass="md-header__button md-icon"for=__drawer><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg></label><divclass=md-header__titledata-md-component=header-title><divclass=md-header__ellipsis><divclass=md-header__topic><spanclass=md-ellipsis> LinuxServer.io </span></div><divclass=md-header__topicdata-md-component=header-topic><spanclass=md-ellipsis> Updating our containers </span></div></div></div><formclass=md-header__optiondata-md-component=palette><inputclass=md-optiondata-md-color-media="(prefers-color-scheme: light)"data-md-color-scheme=defaultdata-md-color-primary=purpledata-md-color-accent=indigoaria-label="Switch to dark mode"type=radioname=__paletteid=__palette_1><labelclass="md-header__button md-icon"title="Switch to dark mode"for=__palette_2hidden><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg></label><inputclass=md-optiondata-md-color-media="(prefers-color-scheme: dark)"data-md-color-scheme=slatedata-md-color-primary=purpledata-md-color-accent=indigoaria-label="Switch to light mode"type=radioname=__paletteid=__palette_2><labelclass="md-header__button md-icon"title="Switch to light mode"for=__palette_1hidden><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M1218c-.890-1.74-.2-2.5-.55C11.5616.51314.421312c0-2.42-1.44-4.5-3.5-5.45C10.266.211.116126a660016666001-66m8-9.31V4h-4.69L12.698.694H4v4.69L.6912415.31V20h4.69L1223.3115.3120
</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