<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VPS storage &#8211; Aveshost Blog</title>
	<atom:link href="https://blog.aveshost.com/tag/vps-storage/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.aveshost.com</link>
	<description>Your Blueprint for Online Success</description>
	<lastBuildDate>Thu, 19 Nov 2026 17:18:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://blog.aveshost.com/wp-content/uploads/2026/01/logo-150x150.png</url>
	<title>VPS storage &#8211; Aveshost Blog</title>
	<link>https://blog.aveshost.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Docker Disk Space Full? How to Find What Is Using Your VPS Storage</title>
		<link>https://blog.aveshost.com/docker-disk-space-full/</link>
					<comments>https://blog.aveshost.com/docker-disk-space-full/#respond</comments>
		
		<dc:creator><![CDATA[James Wilson]]></dc:creator>
		<pubDate>Thu, 19 Nov 2026 17:17:25 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux VPS]]></category>
		<category><![CDATA[VPS storage]]></category>
		<guid isPermaLink="false">https://blog.aveshost.com/?p=6005</guid>

					<description><![CDATA[Find what is filling your Docker VPS with practical Linux commands, targeted cleanup guidance, log rotation and checks that protect persistent data.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">When you see a <strong>Docker disk space full</strong> error, start with <code>df -h</code>, <code>df -i</code> and <code>docker system df -v</code>. Together, they show whether the problem is filesystem capacity, exhausted inodes or Docker objects. The largest culprit may be container logs, database volumes, build cache or backups outside Docker.</p>



<p class="wp-block-paragraph">Our approach is to measure first, identify the owner of the data, and remove only what you can safely replace. A database volume can be essential even when Docker calls it unused. Never delete files directly from Docker’s internal storage directories to make an alert disappear.</p>



<p class="wp-block-paragraph">This guide covers Docker Engine on a Linux VPS, with GNU/Linux commands suitable for Ubuntu and Debian. Connect over SSH using an account with sudo rights. Docker commands below use <code>sudo</code> for a rootful installation; for rootless Docker, run them as the owning user without sudo.</p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><div><div><a href="#check-filesystem">1. Check disk capacity and inodes first</a></div><div><a href="#locate-directories">2. Find the largest host directories</a></div><div><a href="#docker-usage">3. Compare Docker images, containers and build cache</a></div><div><a href="#volumes-mounts">4. Trace persistent volumes and bind mounts</a></div><div><a href="#logs-hidden-space">5. Check logs and space that du cannot explain</a></div><div><a href="#targeted-cleanup">6. Reclaim space with targeted cleanup</a></div><div><a href="#rotation">7. Prevent Docker disk space full errors with log rotation</a></div><div><a href="#verify-capacity">8. Recheck storage and decide whether to expand</a></div><div><a href="#faq">Frequently asked questions</a></div></div></nav></div>



<h2 id="check-filesystem" class="wp-block-heading">1. Check disk capacity and inodes first</h2>



<p class="wp-block-paragraph">Run these read-only checks before any cleanup:</p>



<pre class="wp-block-code"><code>df -h
df -i
lsblk -f</code></pre>



<p class="wp-block-paragraph">In <code>df -h</code>, check the filesystem containing the failing path and its <code>Avail</code>, <code>Use%</code> and mount point. A full root filesystem can stop image pulls, database writes and deployments. Repeated overlay entries often report the same backing filesystem; do not add their sizes together.</p>



<p class="wp-block-paragraph">In <code>df -i</code>, a filesystem at 100% inode usage can reject new files despite having free bytes. Large numbers of tiny cache or session files can cause this. <code>lsblk -f</code> helps identify disks and mount points. See the <a href="https://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html" rel="noopener">GNU df documentation</a> for these filesystem checks.</p>



<p class="wp-block-paragraph">If production writes are already failing, pause nonessential builds, imports and backup jobs while you investigate. Avoid writing a fresh backup onto the full filesystem; use a verified off-server destination. Do not repeatedly restart a database that has no room to recover.</p>



<h2 id="locate-directories" class="wp-block-heading">2. Find the largest host directories</h2>



<p class="wp-block-paragraph">Start at the affected mount point. For a full root filesystem:</p>



<pre class="wp-block-code"><code>sudo du -xhd1 / 2&gt;/dev/null | sort -h
sudo du -xhd1 /var 2&gt;/dev/null | sort -h
sudo du -xhd1 /var/lib 2&gt;/dev/null | sort -h</code></pre>



<p class="wp-block-paragraph">The <code>-x</code> option stays on one filesystem and <code>-d1</code> limits the displayed depth. Repeat against the biggest directory. If Docker or application data lives on a separate mounted disk, scan that mount separately. Permission or I/O errors hidden by the redirection still need investigation if totals look incomplete.</p>



<p class="wp-block-paragraph">Check <code>/var/log</code>, application uploads, deployment folders and local backup archives as well as Docker. Directory scans can create noticeable I/O on busy servers; run them one level at a time. The <a href="https://www.gnu.org/software/coreutils/manual/html_node/du-invocation.html" rel="noopener">GNU du manual</a> explains these options.</p>



<p class="wp-block-paragraph">Locate Docker’s configured data root and storage backend:</p>



<pre class="wp-block-code"><code>sudo docker info --format '{{.DockerRootDir}}'
sudo docker info</code></pre>



<p class="wp-block-paragraph">The usual rootful data directory is <code>/var/lib/docker</code>, but fresh Docker Engine 29.0 and later installations use the containerd image store by default. Image contents and container snapshots then live under <code>/var/lib/containerd</code>, while volumes and other Docker data remain under the Docker data root. Custom and rootless installations differ. Changing Docker’s <code>data-root</code> does not move containerd’s separate data; check the <a href="https://docs.docker.com/engine/daemon/" rel="noopener">daemon storage documentation</a>.</p>



<h2 id="docker-usage" class="wp-block-heading">3. Compare Docker images, containers and build cache</h2>



<pre class="wp-block-code"><code>sudo docker system df -v
sudo docker ps -a --size
sudo docker image ls
sudo docker buildx du</code></pre>



<p class="wp-block-paragraph">The verbose <code>docker system df</code> output separates images, containers, local volumes and build cache. Shared image layers mean individual image sizes cannot simply be added together. “Reclaimable” describes Docker references; it does not tell you whether an old deployment or its data matters to your business.</p>



<p class="wp-block-paragraph">The size shown by <code>docker ps --size</code> measures container writable layers. It excludes mounted data and logging-driver files, so a small container can still be responsible for substantial disk usage. See Docker’s <a href="https://docs.docker.com/engine/storage/drivers/" rel="noopener">writable-layer explanation</a>.</p>



<p class="wp-block-paragraph">If you use Buildx, <code>docker buildx du</code> reports cache for the selected builder. Other builders can retain separate caches. If the command is unavailable, check whether Buildx is installed; do not install extra tooling during an outage simply to follow this optional check.</p>



<p class="wp-block-paragraph">For example, if the filesystem has 72 GB used but Docker objects explain only 28 GB, investigate logs, bind mounts, backups and host files. These example totals illustrate the investigation; they are not a complete accounting formula.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1536" height="1024" src="https://blog.aveshost.com/wp-content/uploads/2026/11/docker-vps-storage-breakdown.webp" alt="Six VPS storage consumers: Docker images, writable layers, volumes, bind mounts, container logs and host files." class="wp-image-6007" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/docker-vps-storage-breakdown.webp 1536w, https://blog.aveshost.com/wp-content/uploads/2026/11/docker-vps-storage-breakdown-300x200.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/docker-vps-storage-breakdown-1024x683.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/docker-vps-storage-breakdown-768x512.webp 768w" sizes="(max-width: 1536px) 100vw, 1536px" /></figure>



<h2 id="volumes-mounts" class="wp-block-heading">4. Trace persistent volumes and bind mounts</h2>



<p class="wp-block-paragraph">Replace <code>app</code> and <code>app_data</code> below with names from your own server:</p>



<pre class="wp-block-code"><code>sudo docker inspect app --format '{{json .Mounts}}'
sudo docker volume ls
sudo docker volume inspect app_data
sudo docker ps -a --filter volume=app_data</code></pre>



<p class="wp-block-paragraph">The mount list identifies whether a container writes to a Docker volume or a host bind mount. For a bind mount, inspect the reported host source directory with <code>du</code>. For local volumes, compare the volume names and sizes in <code>docker system df -v</code>; remote volume drivers need their own storage checks.</p>



<p class="wp-block-paragraph">A PostgreSQL data volume, an upload directory or n8n’s persistent data can grow even when application images stay small. Use the application’s retention and maintenance tools after checking backups. Never manually remove PostgreSQL WAL files, database table files or Docker layer directories.</p>



<p class="wp-block-paragraph">Before removing a volume, establish which service owns it, whether stopped containers reference it, and whether its contents have a tested backup. An unattached volume may belong to a temporarily removed Compose project. Our <a href="https://blog.aveshost.com/supabase-vps-requirements/">Supabase VPS sizing guide</a> explains why persistent storage needs its own capacity allowance.</p>



<h2 id="logs-hidden-space" class="wp-block-heading">5. Check logs and space that du cannot explain</h2>



<p class="wp-block-paragraph">Inspect the logging driver and path for the container you suspect:</p>



<pre class="wp-block-code"><code>sudo docker inspect app --format '{{.HostConfig.LogConfig.Type}} {{.LogPath}}'
sudo journalctl --disk-usage
sudo lsof +L1</code></pre>



<p class="wp-block-paragraph">For a rootful container using a file-based driver, inspect the reported log path’s allocated size with <code>sudo du -h /exact/reported/log/path</code>. A blank path can be normal for other drivers. Repeated application errors can fill logs quickly; inspect a short recent sample with <code>sudo docker logs --tail 100 app</code>.</p>



<p class="wp-block-paragraph">Docker’s default <code>json-file</code> logging does not rotate files unless configured. Docker recommends the rotating <code>local</code> driver for many non-Kubernetes use cases. See its <a href="https://docs.docker.com/engine/logging/configure/" rel="noopener">logging-driver guidance</a>. Do not delete or truncate Docker-managed log files behind the daemon.</p>



<p class="wp-block-paragraph">If <code>df</code> shows far more use than <code>du</code>, <code>lsof +L1</code> can reveal deleted files still held open by processes. Space returns when the last open reference closes. Identify the service and plan a controlled restart or supported log reopen; do not kill unfamiliar processes. If lsof is unavailable, skip this check until suitable tooling is available.</p>



<p class="wp-block-paragraph">Filesystem metadata, reserved space and files hidden beneath mounts can also explain differences. A large systemd journal is separate from container logs. The <a href="https://www.freedesktop.org/software/systemd/man/latest/journalctl.html" rel="noopener">journalctl manual</a> documents its disk-usage and retention controls.</p>



<h2 id="targeted-cleanup" class="wp-block-heading">6. Reclaim space with targeted cleanup</h2>



<p class="wp-block-paragraph">Once you know the cause, choose a matching action. The commands in this section delete data; inspect candidates and preserve rollback requirements first. They are alternatives, not a script to run from top to bottom.</p>



<p class="wp-block-paragraph">To remove dangling images that no container references:</p>



<pre class="wp-block-code"><code>sudo docker image prune</code></pre>



<p class="wp-block-paragraph">To prune dangling build cache older than seven days with the default builder:</p>



<pre class="wp-block-code"><code>sudo docker builder prune --filter "until=168h"</code></pre>



<p class="wp-block-paragraph">To remove one confirmed disposable stopped container, including its writable layer:</p>



<pre class="wp-block-code"><code>sudo docker rm old-test-container</code></pre>



<p class="wp-block-paragraph">The first two commands prompt for confirmation. Keep those prompts. Cached build layers can be regenerated, but future builds may take longer. Retain images needed for rollback and verify registry access before removing them. The <a href="https://docs.docker.com/engine/manage-resources/pruning/" rel="noopener">Docker pruning guide</a> describes each object type.</p>



<p class="wp-block-paragraph">Avoid starting with <code>docker system prune -a --volumes</code>. System prune removes stopped containers, unused networks, image data and build cache; <code>-a</code> broadens image removal and <code>--volumes</code> adds unused anonymous volumes. Separate volume pruning with <code>-a</code> can also remove unused named volumes. “Unused” does not mean safe to lose.</p>



<p class="wp-block-paragraph">For large host journals, archive needed incident evidence first, then use an agreed retention policy. For example, <code>sudo journalctl --rotate --vacuum-size=500M</code> removes older archived journal files toward the example limit; it is not a hard cap on total journal storage. Do not remove database or upload data to hit an arbitrary free-space target.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Space consumer</th><th>Preferred response</th><th>Main tradeoff</th></tr></thead><tbody><tr><td>Dangling images</td><td>Review and prune dangling images</td><td>May lose locally retained artifacts</td></tr><tr><td>Build cache</td><td>Prune cache for the relevant builder</td><td>Slower future builds</td></tr><tr><td>Container logs</td><td>Fix noisy app; configure rotation</td><td>Recreation may interrupt service</td></tr><tr><td>Database or uploads</td><td>Apply app retention or add capacity</td><td>Data requires verified backups</td></tr></tbody></table></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1536" height="1024" src="https://blog.aveshost.com/wp-content/uploads/2026/11/docker-storage-recovery-workflow.webp" alt="Five-step Docker storage recovery workflow: measure, locate, protect data, clean selectively and prevent repeats." class="wp-image-6008" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/docker-storage-recovery-workflow.webp 1536w, https://blog.aveshost.com/wp-content/uploads/2026/11/docker-storage-recovery-workflow-300x200.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/docker-storage-recovery-workflow-1024x683.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/docker-storage-recovery-workflow-768x512.webp 768w" sizes="(max-width: 1536px) 100vw, 1536px" /></figure>



<h2 id="rotation" class="wp-block-heading">7. Prevent Docker disk space full errors with log rotation</h2>



<p class="wp-block-paragraph">Configure rotation in the service’s Compose definition. Merge this example under the existing service instead of replacing the whole file:</p>



<pre class="wp-block-code"><code>services:
  app:
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"</code></pre>



<p class="wp-block-paragraph">This retains a bounded set of JSON log files per container, roughly 30 MB with these example settings, plus overhead. Choose limits that fit your troubleshooting and compliance needs. See the <a href="https://docs.docker.com/engine/logging/drivers/json-file/" rel="noopener">JSON-file logging options</a>. Application logs written inside volumes need their own rotation.</p>



<p class="wp-block-paragraph">Changing the definition does not retrofit existing containers. Validate with <code>docker compose config</code>, verify persistent mounts, and recreate the affected service during a suitable maintenance window. Recreation can discard files kept only in its writable layer and interrupt requests. A plain restart does not apply a new logging configuration.</p>



<p class="wp-block-paragraph">Monitor free bytes and inodes on each data filesystem. Example alerts at 80% and 90% are starting points; adjust for growth rate and response time. Keep backups off-server, enforce retention and leave room for image extraction, database maintenance and temporary deployment files.</p>



<h2 id="verify-capacity" class="wp-block-heading">8. Recheck storage and decide whether to expand</h2>



<pre class="wp-block-code"><code>df -h
df -i
sudo docker system df -v
sudo docker ps</code></pre>



<p class="wp-block-paragraph">Compare the same filesystem before and after cleanup. Check the application’s health endpoint, perform a normal read/write transaction and confirm scheduled backups still work. If usage climbs again immediately, address the writer or retention policy rather than repeating broad pruning.</p>



<p class="wp-block-paragraph">If required application data dominates storage, additional capacity may be the right fix. A larger virtual disk may still need partition and filesystem expansion inside Linux; follow the procedure for the actual filesystem. Plan storage moves for Docker and containerd separately.</p>



<p class="wp-block-paragraph">For a new deployment, explore our <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">self-managed VPS hosting</a> and size storage for persistent data, logs, builds and backup staging. If you need help assessing a running Aveshost server, <a href="https://www.aveshost.com/support" rel="noopener">contact our support team</a> with the filesystem figures and largest directories. Redact credentials and private application data before sharing diagnostic output.</p>



<h2 id="faq" class="wp-block-heading">Frequently asked questions</h2>


<div id="rank-math-faq" class="rank-math-block">
<div class="rank-math-list ">
<div id="faq-question-9b639d933b26468dafe46553c592fe5e" class="rank-math-list-item">
<h3 class="rank-math-question ">Why is my VPS full when Docker reports little disk usage?</h3>
<div class="rank-math-answer ">

<p>Docker object totals do not explain every host file. Check bind-mounted data, logging-driver files, local backups, system journals and deleted files held open by processes. Confirm which filesystem is full before comparing totals.</p>

</div>
</div>
<div id="faq-question-2f3d0f198e4c43a9b9a68110767b7f21" class="rank-math-list-item">
<h3 class="rank-math-question ">Can I delete /var/lib/docker/overlay2 to free space?</h3>
<div class="rank-math-answer ">

<p>No. Docker manages layer files and metadata together. Manual deletion can corrupt containers and images. Identify disposable objects through Docker commands, preserve persistent data and use supported removal operations.</p>

</div>
</div>
<div id="faq-question-5aef7d8b21e04187879edd5cb7ec34bb" class="rank-math-list-item">
<h3 class="rank-math-question ">Does docker system prune remove running containers?</h3>
<div class="rank-math-answer ">

<p>It does not remove running containers, but it removes stopped containers and other unused objects. Flags broaden its scope. A stopped container can contain valuable writable-layer data, so review what you need before confirming.</p>

</div>
</div>
<div id="faq-question-67cd483b664b44aba8b9f89a2f3e92b3" class="rank-math-list-item">
<h3 class="rank-math-question ">Why does Docker still say no space left when df -h shows free space?</h3>
<div class="rank-math-answer ">

<p>Check inode usage with df -i and inspect the filesystem containing the exact failing path. A separate full mount, a quota or a filesystem-specific limit can also block writes while another filesystem has free capacity.</p>

</div>
</div>
<div id="faq-question-eec221d9fabd402b923397319548e681" class="rank-math-list-item">
<h3 class="rank-math-question ">Will increasing VPS RAM fix a full Docker disk?</h3>
<div class="rank-math-answer ">

<p>Additional RAM does not increase disk capacity. Reclaim confirmed disposable storage, reduce growth or expand storage. Investigate swap separately if it is a significant disk consumer; removing it without a memory plan can destabilise services.</p>

</div>
</div>
</div>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://blog.aveshost.com/docker-disk-space-full/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
