# purge deployments cloudflare

Published articles for purge deployments cloudflare.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Purge old Cloudflare Pages deployments

DevFeed: [Purge old Cloudflare Pages deployments](<https://devfeed.tech/articles/purge-old-cloudflare-pages-deployments-27724.md>)

Original publisher: [Read original article](<https://gagor.pro/2025/08/purge-old-cloudflare-pages-deployments/>)

Author: Tom

Published: 2025-08-26T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Cloudflare](<https://devfeed.tech/topics/cloudflare.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [API](<https://devfeed.tech/topics/api.md>), [Script](<https://devfeed.tech/topics/script.md>), [GitHub Actions](<https://devfeed.tech/topics/github-actions.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [automated](<https://devfeed.tech/tags/automated.md>), [bash](<https://devfeed.tech/tags/bash.md>), [bash-automation](<https://devfeed.tech/tags/bash-automation.md>), [cleanup](<https://devfeed.tech/tags/cleanup.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [cloudflare-api-script](<https://devfeed.tech/tags/cloudflare-api-script.md>), [cloudflare-pages](<https://devfeed.tech/tags/cloudflare-pages.md>), [delete-old-deployments](<https://devfeed.tech/tags/delete-old-deployments.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [devops](<https://devfeed.tech/tags/devops.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [github-actions-cloudflare-cleanup](<https://devfeed.tech/tags/github-actions-cloudflare-cleanup.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [hugo](<https://devfeed.tech/tags/hugo.md>), [purge-deployments-cloudflare](<https://devfeed.tech/tags/purge-deployments-cloudflare.md>), [secrets](<https://devfeed.tech/tags/secrets.md>), [token](<https://devfeed.tech/tags/token.md>)

### AI overview

A Bash script uses the Cloudflare API to paginate through Cloudflare Pages deployments and delete deployments older than 30 days while retaining a configurable number of deployments. The article also outlines the API token, account ID, and GitHub Actions secret setup needed to run the cleanup.

### Source excerpt

Learn how to automatically delete old Cloudflare Pages deployments using a Bash script and the Cloudflare API. Keep your account clean and reduce clutter by removing outdated deployments.