diff --git a/lib/util/gitfs/fs/index.ts b/lib/util/gitfs/fs/index.ts
index cb0e7a7814c003ffe312980830393a0bf8f41df6..d68fe20ce91e36845d38d7f9191dae9569d9a826 100644
--- a/lib/util/gitfs/fs/index.ts
+++ b/lib/util/gitfs/fs/index.ts
@@ -49,7 +49,8 @@ export async function writeLocalFile(
 }
 
 export async function deleteLocalFile(fileName: string): Promise<void> {
-  await fs.remove(fileName);
+  const localFileName = join(localDir, fileName);
+  await fs.remove(localFileName);
 }
 
 // istanbul ignore next