diff --git a/doc/support/generate.sh b/doc/support/generate.sh
index dcb74375..f5785c64 100755
--- a/doc/support/generate.sh
+++ b/doc/support/generate.sh
@@ -45,6 +45,7 @@ done
# doc.
${sed_ext} -e 's%%%g' \
< "${output_dir}/doc/index.html" > "${output_dir}/index.html"
+rm "${output_dir}/doc/index.html"
# Create man/index.html
cd "${output_dir}/man"