TL;DR:
If you’re encountering the error message: “The build image for this site uses Ubuntu 16.04 Xenial Xerus, which is no longer supported” when deploying a static site to Netlify, try deleting the site from Netlify and recreating it using the same source GitHub repository. This simple process resolved the issue for me by resetting the build configuration to use the latest supported build image.

Background

Recently, I faced a frustrating issue while trying to redeploy a static website on Netlify. The site’s source code was hosted in a private GitHub repository, directly linked to Netlify. This setup ensured that whenever any source files in the repository were updated, Netlify would automatically kick in and redeploy the entire site, reflecting the latest changes.

The repository itself had been untouched for a year or two. It primarily contained static HTML files, along with some images, a few small ZIP archives, and metadata files like robots.txt. The site was a completely static site—ideal for hosting on Netlify.

However, when I attempted to redeploy the site by making slight changes to the HTML files in the associated GitHub repository, the following error appeared in the build logs:

“The build image for this site uses Ubuntu 16.04 Xenial Xerus, which is no longer supported.”

Given that the repository and configuration hadn’t been updated in a long time, I was puzzled. I double-checked Netlify’s settings and confirmed that I wasn’t explicitly using this deprecated build image. Yet, the issue persisted.

How I Solved the Problem

After some trial and error, I discovered a solution that worked for me with minimal effort:

  1. Delete the site entirely from Netlify.
    This step removes the existing build configuration and any lingering settings tied to the deprecated Ubuntu 16.04 build image.

  2. Recreate the site using the same GitHub repository.
    Navigate to Netlify and create a new deployment using the same source GitHub repository. This process resets the build environment to use the latest supported build image automatically.

This quick reset resolved the issue, and my site was successfully redeployed without encountering the error again.

Why This Worked

Netlify occasionally stores certain settings or build configurations specific to a site. Even if the code or repository hasn’t changed, older sites may retain outdated configurations. In this case, the problem was likely caused by lingering references to the deprecated Ubuntu 16.04 (Xenial Xerus) build image. Deleting and recreating the site forces Netlify to reset and use the current defaults, including updated build images.

Conclusion

Sometimes, solving deployment issues requires only a small effort and a bit of experimentation. If you encounter errors like “The build image for this site uses Ubuntu 16.04 Xenial Xerus, which is no longer supported”, don’t overcomplicate the solution. A quick reset—deleting and redeploying the site—might be all you need to get things back on track.