diff --git a/{{cookiecutter.project_slug}}/docs/cleanup.py b/{{cookiecutter.project_slug}}/docs/cleanup.py
index f5890d9cc7cc976261dfb986e403ed4ce68bcf93..c83aa64a034a0baab3b1aef52ee61421cc32190f 100644
--- a/{{cookiecutter.project_slug}}/docs/cleanup.py
+++ b/{{cookiecutter.project_slug}}/docs/cleanup.py
@@ -10,6 +10,9 @@ file_dir = os.path.dirname(os.path.realpath(__file__))
 clean_dir = os.path.join(file_dir, "source", "source_documentation")
 print(f"Cleaning.. {clean_dir}/*")
 
+if not os.path.exists(clean_dir):
+    exit()
+
 for file_name in os.listdir(clean_dir):
     file = os.path.join(clean_dir, file_name)
     match file_name: