diff --git a/meta/classes-recipe/dpkg-base.bbclass b/meta/classes-recipe/dpkg-base.bbclass
index 4ec0ddbe..73238a66 100644
--- a/meta/classes-recipe/dpkg-base.bbclass
+++ b/meta/classes-recipe/dpkg-base.bbclass
@@ -237,6 +237,8 @@ CLEANFUNCS =+ "deb_clean"
 # dropped (instead of its variants)
 deb_clean() {
     [ -d "${DEPLOY_DIR_DEB}" ] || return 0
+    # isar-apt may not exist (yet), e.g. after removing the tmp directory
+    [ -f "${REPO_ISAR_DIR}/${DISTRO}/conf/distributions" ] || return 0
     for deb in $(find ${DEPLOY_DIR_DEB} -maxdepth 1 -name '*.deb'); do
         repo_del_package "${REPO_ISAR_DIR}"/"${DISTRO}" \
             "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" "${deb}"
diff --git a/meta/classes-recipe/dpkg-source.bbclass b/meta/classes-recipe/dpkg-source.bbclass
index 6f9091a8..7b4569dd 100644
--- a/meta/classes-recipe/dpkg-source.bbclass
+++ b/meta/classes-recipe/dpkg-source.bbclass
@@ -54,6 +54,8 @@ CLEANFUNCS += "deb_clean_source"
 # runs sstate_cleanall() taking that lock itself, and flock() would deadlock on
 # the nested acquisition.
 deb_clean_source() {
+    # isar-apt may not exist (yet), e.g. after removing the tmp directory
+    [ -f "${REPO_ISAR_DIR}/${DISTRO}/conf/distributions" ] || return 0
     repo_del_srcpackage "${REPO_ISAR_DIR}"/"${DISTRO}" \
         "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" "${DEBIAN_SOURCE}"
 }
