diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index e186dede92..bc8ff2bcdc 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -44,5 +44,5 @@ do_install_append () {
 	# Upstream is discussing ways to solve the issue properly, until then let's
 	# just not install the problematic files.
 	# More info: http://benno.id.au/blog/2013/01/15/python-determinism
-	rm ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython*
+	rm -f ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython*
 }
diff --git a/meta/recipes-devtools/python/python3_3.9.9.bb b/meta/recipes-devtools/python/python3_3.9.9.bb
index f41529833c..7d0bef06d5 100644
--- a/meta/recipes-devtools/python/python3_3.9.9.bb
+++ b/meta/recipes-devtools/python/python3_3.9.9.bb
@@ -174,8 +174,8 @@ do_install_append() {
         # Upstream is discussing ways to solve the issue properly, until then let's
         # just not install the problematic files.
         # More info: http://benno.id.au/blog/2013/01/15/python-determinism
-        rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
-        rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
+        rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
+        rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
 }
 
 do_install_append_class-nativesdk () {
