diff --git a/lib/workers/repository/cleanup.js b/lib/workers/repository/cleanup.js
index e96707a95952d1d6ec31d1c117a8bffc09c88198..f2fdeabd8a6cfbe74bdabc5c799215cb94840107 100644
--- a/lib/workers/repository/cleanup.js
+++ b/lib/workers/repository/cleanup.js
@@ -3,6 +3,10 @@ module.exports = {
 };
 
 async function pruneStaleBranches(config) {
+  // istanbul ignore if
+  if (config.baseBranches && config.baseBranches.length) {
+    return;
+  }
   // TODO: try/catch
   const { branchList } = config;
   logger.debug('Removing any stale branches');