diff --git a/lib/workers/repository/cache.ts b/lib/workers/repository/cache.ts
index 0baba8a62a4cde7642eb535919ad0bf703014141..49f0deb3bf61a103672b50f6da4588c792c71506 100644
--- a/lib/workers/repository/cache.ts
+++ b/lib/workers/repository/cache.ts
@@ -28,10 +28,9 @@ function generateBranchUpgradeCache(
     newDigest,
     sourceUrl,
   } = upgrade;
-  return {
+  const result: BranchUpgradeCache = {
     datasource,
     depName,
-    packageName,
     fixedVersion,
     currentVersion,
     newVersion,
@@ -39,9 +38,15 @@ function generateBranchUpgradeCache(
     newDigest,
     sourceUrl,
   };
+  if (packageName) {
+    result.packageName = packageName;
+  }
+  return result;
 }
 
-async function generateBranchCache(branch: BranchConfig): Promise<BranchCache> {
+async function generateBranchCache(
+  branch: BranchConfig
+): Promise<BranchCache | null> {
   const { branchName } = branch;
   try {
     const sha = getBranchCommit(branchName) || null;
@@ -89,9 +94,12 @@ async function generateBranchCache(branch: BranchConfig): Promise<BranchCache> {
 }
 
 export async function setBranchCache(branches: BranchConfig[]): Promise<void> {
-  const branchCache: BranchCache[] = [];
+  const branchCaches: BranchCache[] = [];
   for (const branch of branches) {
-    branchCache.push(await generateBranchCache(branch));
+    const branchCache = await generateBranchCache(branch);
+    if (branchCache) {
+      branchCaches.push(branchCache);
+    }
   }
-  getCache().branches = branchCache.filter(Boolean);
+  getCache().branches = branchCaches;
 }
diff --git a/tsconfig.strict.json b/tsconfig.strict.json
index 3e42df22a682c5c414ecc823f37a0ffe7e6c1321..85ef1dd9a1c61363046070c503676ae07cc2c116 100644
--- a/tsconfig.strict.json
+++ b/tsconfig.strict.json
@@ -30,7 +30,6 @@
     "lib/workers/global/config/parse/index.ts",
     "lib/workers/global/index.ts",
     "lib/workers/global/initialize.ts",
-    "lib/workers/repository/cache.ts",
     "lib/workers/repository/changelog/index.ts",
     "lib/workers/repository/error-config.ts",
     "lib/workers/repository/error.ts",
@@ -41,7 +40,6 @@
     "lib/workers/repository/finalise/prune.ts",
     "lib/workers/repository/index.ts",
     "lib/workers/repository/init/apis.ts",
-    "lib/workers/repository/init/cache.ts",
     "lib/workers/repository/init/config.ts",
     "lib/workers/repository/init/index.ts",
     "lib/workers/repository/init/semantic.ts",