diff options
-rw-r--r-- | apt-pkg/algorithms.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 702030943..a8e198054 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1580,7 +1580,7 @@ std::string GetProtectedKernelsRegex(pkgCache *cache, bool ReturnRemove) std::clog << "Keeping latest kernel " << latest->first << std::endl; keep.insert(latest->first); } - if (previous != version2unames.rend()) + if (keep.size() < 3 && previous != version2unames.rend()) { if (Debug) std::clog << "Keeping previous kernel " << previous->first << std::endl; |