A GitHub Action to deletes artifacts within the workflow run.
  • TypeScript 100%
Find a file
2026-03-14 11:42:52 +00:00
.github build: update workflow action versions (#33) 2026-03-12 17:20:24 +00:00
dist build: update workflow action versions (#33) 2026-03-12 17:20:24 +00:00
src chore: update deps, switch to esm, and improve tsconfig (#32) 2026-03-12 17:10:40 +00:00
.editorconfig feat: adds support for actions/upload-artifact@v4 (#17) (fixed #14) 2023-12-24 18:41:48 +00:00
.gitignore Update dev environment 2022-10-12 14:04:07 +01:00
action.yml Upgrade Node.js version from 20 to 24 (#31) 2026-03-11 15:07:30 +00:00
CHANGELOG.md docs: bump v5.1 2024-08-31 17:42:34 +01:00
LICENSE refactor: update repo selection 2023-12-24 19:57:54 +00:00
package-lock.json 6.0.0 2026-03-14 11:37:14 +00:00
package.json 6.0.0 2026-03-14 11:37:14 +00:00
README.md fix: commit SHA 2026-03-14 11:42:52 +00:00
tsconfig.json chore: update deps, switch to esm, and improve tsconfig (#32) 2026-03-12 17:10:40 +00:00

CI Example

Delete artifacts

A GitHub Action for deleting artifacts within the workflow run. This can be useful when artifacts are shared across jobs, but are no longer needed when the workflow is complete.

Compatibility

geekyeggo/delete-artifact actions/upload-artifact
@v6 @v4, @v6
@v4, @v5 @v4
@v1, @v2 @v1, @v2, @v3

Tip

You can reference the immutable commit SHA, instead of a version, for example.

- uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0

Usage

See action.yml

Delete an individual artifact

steps:
    - name: Checkout
      uses: actions/checkout@v6

    - name: Create test file
      run: echo hello > test.txt

    - uses: actions/upload-artifact@v6
      with:
          name: my-artifact
          path: test.txt

    - uses: geekyeggo/delete-artifact@v6
      with:
          name: my-artifact

Specify multiple names

steps:
    - uses: geekyeggo/delete-artifact@v6
      with:
          name: |
              artifact-*
              binary-file
              output

🚨 Error vs Fail

By default, the action will fail when it was not possible to delete an artifact (with the exception of name mismatches). When the deletion of an artifact is not integral to the success of a workflow, it is possible to error without failure. All errors are logged.

steps:
    - uses: geekyeggo/delete-artifact@v6
      with:
          name: okay-to-keep
          failOnError: false