diff --git a/windows/deps/Makefile b/windows/deps/Makefile
index c4f823b986639d088eb3a6d800f036c8b1ada547..06d53027e4b3b088c5db04ea99fcf6004075eb5d 100644
--- a/windows/deps/Makefile
+++ b/windows/deps/Makefile
@@ -104,7 +104,7 @@ octave64: tarballs/octave-${OCTAVE_VERSION}${OCTAVE_W64_BUILD}-w64.7z
 	mv octave-${OCTAVE_VERSION}-w64 $@
 	# Clean up MinGW stuff that interferes with our cross-compiler
 	cd $@/mingw64/lib && rm -f libadvapi32.a libkernel32.a libmingw32.a libmingwex.a libmoldname.a libmsvcrt.a libpthread.dll.a libshell32.a libuser32.a
-	cd $@/mingw64/include && rm -f $$(grep -l "This file is part of the mingw-w64 runtime package" *.h) minwinbase.h omp.h swprintf.inl
+	cd $@/mingw64/include && rm -f $$(grep -l "This file is part of the \\(mingw-w64 runtime\\|mingw-runtime\\) package" *.h) minwinbase.h omp.h swprintf.inl
 	touch $@
 
 octave: octave64