From 14535446557cb8b4125e7badc5e67a9f7790ab53 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 3 Dec 2018 09:19:46 +0100 Subject: 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 --- apt-private/private-install.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apt-private/private-install.cc') 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::vectorSet("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 mods; mods.push_back(APT::VersionSet::Modifier(MOD_INSTALL, "+", -- cgit v1.2.3