diff --git a/lib/img-functions b/lib/img-functions
index c1fa8af8f..adfbb3efd 100644
--- a/lib/img-functions
+++ b/lib/img-functions
@@ -63,7 +63,7 @@ function run_in_target () {
     # Bug: #1330290
     # Force the inclusion of a typical set of dirs in PATH, this is needed for guest
     # distros that have path elements not in the host PATH.
-    sudo -E TMPDIR= chroot $TMP_MOUNT_PATH env PATH="\$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" sh -c "$cmd"
+    sudo -E chroot $TMP_MOUNT_PATH env -u TMPDIR PATH="\$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" sh -c "$cmd"
     export HOME=$ORIG_HOME
 }