Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

upload-artifact fails because the artifact storage quota is full

ErrorCreate Artifact Container failed: Artifact storage quota has been hit. Unable to upload any new artifacts

Short answer

Uploads fail when your account's shared artifact storage is used up. Delete old artifacts or workflow runs, set a short retention-days on new uploads, and upload less data. GitHub recalculates storage only every 6 to 12 hours, so the error can continue for hours after you free space.

  • Applies to GitHub Actions, actions/upload-artifact v4
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    See which artifacts exist and how large they are, so you know what to delete.

    gh api repos/OWNER/REPO/actions/artifacts --jq '.artifacts[] | [.id, .name, .size_in_bytes, .expires_at] | @tsv'
  2. 2Match what you see, then jump to its fix

    1. 1The quota error comes after many runs that all upload artifactsOld artifacts are still storedFix
    2. 2Every run uploads a large build output or log bundleRetention is longer than you need, and the files are bigFix
    3. 3You already deleted artifacts and the error persists, or it returns within daysThe plan allowance is smaller than your usageFix

What does the error look like?

  • Create Artifact Container failed: Artifact storage quota has been hit. Unable to upload any new artifacts

Cause 1 of 3

Old artifacts are still stored

1Check

By default artifacts are kept for 90 days. Count what is stored in the repository, then look at the Artifacts section of old runs.

gh api repos/OWNER/REPO/actions/artifacts --jq '.total_count'

2Fix

Delete artifacts you no longer need (from the run page, the trash icon next to the artifact) or delete old workflow runs, which removes their artifacts too. Deleted artifacts cannot be restored.

# delete one artifact by id
gh api -X DELETE repos/OWNER/REPO/actions/artifacts/ARTIFACT_ID

3Verify

The artifact list is shorter. Then wait for the usage figure to refresh before the next upload.

gh api repos/OWNER/REPO/actions/artifacts --jq '.total_count'

Confirmed by docs.github.com

Did this fix it?

Cause 2 of 3

Retention is longer than you need, and the files are big

1Check

Look at the upload step. Without retention-days the repository default applies (90 days unless changed). A value for a single artifact must be between 1 and 90.

grep -n -B3 -A6 'upload-artifact' .github/workflows/*.yml

2Fix

Set a short retention for throwaway artifacts and use compression-level 0 for files that do not compress, which the README says makes uploads much faster.

- uses: actions/upload-artifact@v4
  with:
    name: build-output
    path: dist/
    retention-days: 3

3Verify

The artifact on the next run shows an expiry date three days out.

gh api repos/OWNER/REPO/actions/artifacts --jq '.artifacts[0].expires_at'

Confirmed by github.com

Did this fix it?

Cause 3 of 3

The plan allowance is smaller than your usage

1Check

Artifact storage is a pooled allowance shared with GitHub Packages: 500 MB on Free, 1 GB on Pro, 2 GB on Team. Storage accrues hourly, and deleting artifacts lowers current storage but not the usage already accrued this cycle.

gh api repos/OWNER/REPO/actions/artifacts --jq '[.artifacts[].size_in_bytes] | add'

2Fix

Upload only what a later job or a human needs, keep retention short, or raise the allowance through your plan or billing settings.

- uses: actions/upload-artifact@v4
  with:
    name: test-report
    path: reports/*.xml
    retention-days: 7

3Verify

Wait 6 to 12 hours for GitHub to update usage, then re-run the failed job.

gh run rerun --failed

Confirmed by docs.github.com

Did this fix it?

How do I stop it coming back?

  • Set retention-days on every upload-artifact step.
  • Upload artifacts only when a later job or a person needs them.
  • Do not upload node_modules or whole build caches; use the cache action for those.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Servers

docker pull or push to ghcr.io fails with 'denied'

Error response from daemon: denied

ghcr.io refuses a pull or push when Docker is not logged in, when the token lacks the package scope, or when the workflow's GITHUB_TOKEN has no packages permission or no access to that package.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.