diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2018-12-03 09:19:46 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2018-12-03 17:21:39 +0100 |
commit | 14535446557cb8b4125e7badc5e67a9f7790ab53 (patch) | |
tree | 93c3ebe615b0e4ef1d5fe8fb5611fdc016a73fc8 /apt-private/private-install.cc | |
parent | f35601e5d2b9fe8b99c6178cb9b160f1a42f432f (diff) |
Provide a "autopurge" shortcut
This adds a new "autopurge" command that will is a shortcut for
"autoremove --purge"
Thanks: Michael Vogt for the initial work
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r-- | apt-private/private-install.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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, "+", |