Skip to main content

Removing workflow artifacts

You can reclaim used GitHub Actions storage by deleting artifacts before they expire on GitHub.

Deleting an artifact

Warnung

Once you delete an artifact, it cannot be restored.

Um diese Schritte auszuführen, ist Schreibzugriff auf das Repository erforderlich.

Standardmäßig speichert GitHub Buildprotokolle und Artefakte 90 Tage lang, dieser Aufbewahrungszeitraum kann jedoch angepasst werden. Weitere Informationen finden Sie unter Usage limits, billing, and administration.

  1. Navigieren Sie auf GitHub zur Hauptseite des Repositorys.

  2. Klicke unter dem Namen deines Repositorys auf Aktionen.

    Screenshot: Registerkarten für das Repository „github/docs“. Die Registerkarte „Aktionen“ ist mit einem orangefarbenen Rahmen hervorgehoben.

  3. Klicke in der linken Seitenleiste auf den Workflow, den Du sehen willst.

    Screenshot der linken Randleiste der Registerkarte „Aktionen“. Ein Workflow, „CodeQL“, ist dunkelorange umrandet.

  4. Klicke in der Liste der Workflowausführungen auf den Namen der Ausführung, um die Zusammenfassung der Workflowausführung anzuzeigen.

  5. Under Artifacts, click next to the artifact you want to remove.

    Screenshot showing artifacts created during a workflow run. A trash can icon, used to remove an artifact, is outlined in dark orange.

Setting the retention period for an artifact

Retention periods for artifacts and logs can be configured at the repository, organization, and enterprise level. For more information, see Usage limits, billing, and administration.

You can also define a custom retention period for individual artifacts using the actions/upload-artifact action in a workflow. For more information, see Storing and sharing data from a workflow.

Finding the expiration date of an artifact

You can use the API to confirm the date that an artifact is scheduled to be deleted. For more information, see the expires_at value returned by the REST API. For more information, see REST-API-Endpunkte für GitHub-Actions-Artefakte.

Artefakte aus gelöschten Workflowausführungen

Wenn eine Workflowausführung gelöscht wird, werden alle Artefakte, die der Ausführung zugeordnet sind, ebenfalls aus dem Speicher gelöscht. Du kannst einen Workflow löschen, der mit der GitHub Actions-Benutzeroberfläche, der REST-API oder der GitHub-CLI ausgeführt wird: Deleting a workflow run, Löschen einer Workflowausführung oder gh run delete.