summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-06-08 22:21:42 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-06-08 22:21:42 +0200
commite47c7d16435822f40149cd831ff6ba0a143ded85 (patch)
treed005838c306858cfdd6ac604a3c8f32b90547577 /cmdline/apt-get.cc
parent0eb7056b0cc57bceb5cc6c55db102c89e7b475fc (diff)
* add "purge" commandline argument, closes: #133421)
(thanks to Julien Danjou for the patch)
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 64882e3e8..c79c1559e 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1428,7 +1428,11 @@ bool DoInstall(CommandLine &CmdL)
bool DefRemove = false;
if (strcasecmp(CmdL.FileList[0],"remove") == 0)
DefRemove = true;
-
+ else if (strcasecmp(CmdL.FileList[0], "purge") == 0)
+ {
+ _config->Set("APT::Get::Purge", true);
+ DefRemove = true;
+ }
for (const char **I = CmdL.FileList + 1; *I != 0; I++)
{
// Duplicate the string
@@ -2443,6 +2447,7 @@ bool ShowHelp(CommandLine &CmdL)
" upgrade - Perform an upgrade\n"
" install - Install new packages (pkg is libc6 not libc6.deb)\n"
" remove - Remove packages\n"
+ " purge - Remove and purge packages\n"
" source - Download source archives\n"
" build-dep - Configure build-dependencies for source packages\n"
" dist-upgrade - Distribution upgrade, see apt-get(8)\n"