Clearing old files from Pages when new ones arrive

I’ve just used Pages for the first time. Pretty neat. I’ve got a simple static site. I’ve made some revisions in GitHub and the changes flow nicely up to the website.

One change I made was to rename home.html to index.html. Now both pages are up on the web server: https//mydomain.pages.dev/home.html and https://mydomain.pages.dev/index.html.

How do I delete old files? Is there a way to clear the server completely–remove all pre-existing folders and files–before copying up changes?

Hey,

If you didn’t upload the file as part of a deployment it won’t exist anymore.
You may be hitting the asset preservation cache - Serving Pages · Cloudflare Pages docs

If you just don’t hit the file, it’ll be evicted from cache. At maximum, it’ll exist for a week (only if it’s getting consistent traffic)

1 Like

Thanks Walshy. That’s reassuring.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.