diff --git a/installer.sh b/installer.sh
index 0ad51c676c5abdb478cb7f7ccaad528074385520..a012d2bc8812b6b4724d68da522bdb7aeb130cc5 100644
--- a/installer.sh
+++ b/installer.sh
@@ -6,8 +6,12 @@
 { \unalias command; \unset -f command; } >/dev/null 2>&1
 tdir=''
 gitedu_release_url="https://gitedu.hesge.ch/dojo_project/projects/ui/dojocli/-/releases/Latest"
-cleanup() {
+cleanup_success() {
     printf "The dojo is installed in %s\nMake sure %s is in your path\n" "$dest" "$dest"
+    cleanup
+}
+
+cleanup() {
     [ -n "$tdir" ] && {
         printf "Cleaning temporary files in %s\n" "$tdir"
         command rm -rf "$tdir"
@@ -182,7 +186,7 @@ main() {
     else
         linux_install
     fi
-    cleanup
+    cleanup_success
     exit 0
 }