summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-cmndline.cc4
-rw-r--r--apt-private/private-install.cc6
2 files changed, 8 insertions, 2 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index 5ad3b65d3..101e0ae40 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -176,7 +176,7 @@ static bool addArgumentsAPTHelper(std::vector<CommandLine::Args> &Args, char con
static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const * const Cmd)/*{{{*/
{
if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade",
- "dselect-upgrade", "autoremove", "full-upgrade"))
+ "dselect-upgrade", "autoremove", "autopurge", "full-upgrade"))
{
addArg(0, "show-progress", "DpkgPM::Progress", 0);
addArg('f', "fix-broken", "APT::Get::Fix-Broken", 0);
@@ -240,7 +240,7 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const
addArg(0, "color", "APT::Moo::Color", 0);
if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade",
- "dselect-upgrade", "autoremove", "auto-remove", "clean", "autoclean", "auto-clean", "check",
+ "dselect-upgrade", "autoremove", "auto-remove", "autopurge", "clean", "autoclean", "auto-clean", "check",
"build-dep", "full-upgrade", "source"))
{
addArg('s', "simulate", "APT::Get::Simulate", 0);
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 4e888a9bd..1713ff308 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -599,6 +599,12 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<PseudoPkg
_config->Set("APT::Get::AutomaticRemove", "true");
fallback = MOD_REMOVE;
}
+ else if (strcasecmp(CmdL.FileList[0], "autopurge") == 0)
+ {
+ _config->Set("APT::Get::AutomaticRemove", "true");
+ _config->Set("APT::Get::Purge", true);
+ fallback = MOD_REMOVE;
+ }
std::list<APT::VersionSet::Modifier> mods;
mods.push_back(APT::VersionSet::Modifier(MOD_INSTALL, "+",