diff --git a/tools/regenerate_docs.py b/tools/regenerate_docs.py
index 25e6b5383..6e4d8f9ad 100755
--- a/tools/regenerate_docs.py
+++ b/tools/regenerate_docs.py
@@ -141,7 +141,13 @@ def generate_wrapdb_table(output_dir: Path) -> None:
f.write('| Project | Versions | Provided dependencies | Provided programs |\n')
f.write('| ------- | -------- | --------------------- | ----------------- |\n')
for name, info in releases.items():
- versions = [f'[{v}](https://wrapdb.mesonbuild.com/v2/{name}_{v}/{name}.wrap)' for v in info['versions']]
+ versions = []
+ added_tags = set()
+ for v in info['versions']:
+ tag, build = v.rsplit('-', 1)
+ if tag not in added_tags:
+ added_tags.add(tag)
+ versions.append(f'[{v}](https://wrapdb.mesonbuild.com/v2/{name}_{v}/{name}.wrap)')
# Highlight latest version.
versions_str = f'**{versions[0]}**
' + ', '.join(versions[1:])
dependency_names = info.get('dependency_names', [])