diff --git a/irdb-libs/SConscript b/irdb-libs/SConscript
index 9d185d7d55832d161817df411fbeb6ae80aee45d..39a92d48107b6c7c1c310b6b2f58ee0e904b3cd7 100644
--- a/irdb-libs/SConscript
+++ b/irdb-libs/SConscript
@@ -12,8 +12,9 @@ if env.GetOption('clean'):
     os.chdir(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/capstone")
     os.system("make clean")
     os.chdir(os.environ['SECURITY_TRANSFORMS_HOME'])
-    os.chdir(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/keystone/build")
-    os.system("rm -rf " + os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/keystone/build")
+    if os.path.exists(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/keystone/build"):
+        os.chdir(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/keystone/build")
+        os.system("rm -rf " + os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/keystone/build")
     os.chdir(os.environ['SECURITY_TRANSFORMS_HOME'])