summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index c496538cc..a8f99a855 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1824,6 +1824,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
case Item::Install:
ADDARGC("--unpack");
ADDARGC("--auto-deconfigure");
+ // dpkg < 1.20.8 needs --force-remove-protected to deconfigure protected packages
+ if (dpkgProtectedField)
+ ADDARGC("--force-remove-protected");
break;
}