summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index bc2f71c18..c0983b06d 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1718,7 +1718,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
R->Type != pkgCache::Dep::PreDepends)
continue;
pkgCache::PkgIterator N = R.ParentPkg();
- if (N.end() == true || N->CurrentVer == 0)
+ if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false))
continue;
if (Debug == true)
std::clog << "Save " << P << " as another installed garbage package depends on it" << std::endl;