Lesstep
Bitbucket Cloud · Pipelines · Checked October 29, 2026

Bitbucket Pipelines: "No space left on device"

A command in the step stops with a line such as tar: …: Cannot write: No space left on device, and the step fails. The disk of the machine that ran the command is full. The first question is which machine that was: the host of a self-hosted runner, Atlassian's build machine, or another server that a pipe logged in to.

Measure before you delete

Put these lines just before the command that fails and run the pipeline again. df -h shows how full each mounted disk is, and du how much your clone takes:

script:
  - df -h
  - du -sh "$BITBUCKET_CLONE_DIR"
  - ./build.sh

On a self-hosted runner

A runner downloads what a step needs into its working directory on the host: the clone of your repository, and the step's artifacts and caches. When the host runs out of space there, the step fails with no space left on device, in the Pipelines log and in the runner's own runner.log (Atlassian's article Self-hosted runner failing with error "no space left on device"). By default the working directory is /tmp for a Linux Docker runner, and the temp folder inside the folder you unpacked the runner into for a Linux shell, macOS or Windows runner.

On a Linux or macOS host, df -h /tmp (or the runner's folder) shows how much is left. Then delete large files you no longer need, move some to another disk, grow the disk, or give the runner a working directory on a bigger disk:

docker run … \
  -v /data/runner:/data/runner \
  -e WORKING_DIRECTORY=/data/runner …

If you are not sure which folder a Docker runner uses, the same article has you find its container with docker container ls, then read its mounts with docker inspect -f '{{ .Mounts }}' <container id> and its WORKING_DIRECTORY from env inside the container.

On Atlassian's machines

Atlassian's Limitations of Bitbucket Pipelines lists build minutes, Git LFS storage and steps per pipeline, but today gives no disk size for a build. An older version said 5 GB, as BCLOUD-15343, an open request for configurable disk space, quotes. What you can make smaller:

When a pipe ran the command

A pipe such as atlassian/ssh-run runs your commands on another server over SSH, and that server's errors show in your step's log. In a community thread, a tar that failed with this message inside ssh-run was the remote server running out of space; freeing space there fixed it. Atlassian's engineer also suggested a newer version of the pipe.

See the failed command from IntelliJ IDEA

Pipeline Inbox for Bitbucket Pipelines, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pipelines of all your Bitbucket Cloud repositories in an IDE tool window. For a failed pipeline it shows the command the step failed at and that command's last lines, so the No space left on device line and the command that hit it are on screen without opening the log. After you free space on the runner there is no new commit to push: with Pro, Run again builds the same commit once more from the IDE. The list, steps and logs are free; running, re-running and stopping pipelines are Pro (US$1.50 a month, with a 30-day trial).

Get it on JetBrains Marketplace

Atlassian, Bitbucket and Bitbucket Pipelines are trademarks of Atlassian; Git is a trademark of Software Freedom Conservancy; Docker is a trademark of Docker, Inc.; Windows is a trademark of the Microsoft group of companies; macOS is a trademark of Apple Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by any of them.

More: "No online runner available" · "We couldn't clone the repository" · Submodules not cloned · "command not found" · "unexpected system error" · The cache is not used · Pipelines did not run after a push · "Exceeded build time limit of 120 minutes" · "Container 'Build' exceeded memory limit." · "Container 'docker' exceeded memory limit." · "Step exceeded processing limits" · The artifact is missing in the next step · The build passed before and fails now · Build setup takes too long · "You've run out of build minutes" · "Permission denied to update branch" · "You have reached your pull rate limit" (Docker Hub) · "There is an error in your bitbucket-pipelines.yml" · "This pipeline was paused" (deployments) · Bitbucket Pipelines plugins for IntelliJ IDEA, compared · 日本語