tags 133421 + patch thanks At 1013451958 time_t, dominique devriese wrote: > Package: apt > Version: 0.5.4 > Severity: wishlist > > there should be a purge action, so that > apt-get purge <XXX> > would equal > apt-get remove --purge <XXX> > domi
I agree! Patch attached against apt 0.7.1! Cheers, -- Julien Danjou .''`. Debian Developer : :' : http://julien.danjou.info `. `' http://people.debian.org/~acid `- 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD
diff -ur -x '\po' apt-0.7.1/cmdline/apt-get.cc apt-0.7.1.jd/cmdline/apt-get.cc --- apt-0.7.1/cmdline/apt-get.cc 2007-05-02 13:55:26.000000000 +0200 +++ apt-0.7.1.jd/cmdline/apt-get.cc 2007-05-03 17:07:16.000000000 +0200 @@ -1569,6 +1569,11 @@ 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; + } else if (strcasecmp(CmdL.FileList[0], "autoremove") == 0) { _config->Set("APT::Get::AutomaticRemove", "true"); @@ -2620,6 +2625,7 @@ " 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" @@ -2728,6 +2734,7 @@ {"upgrade",&DoUpgrade}, {"install",&DoInstall}, {"remove",&DoInstall}, + {"purge",&DoInstall}, {"autoremove",&DoInstall}, {"dist-upgrade",&DoDistUpgrade}, {"dselect-upgrade",&DoDSelectUpgrade}, diff -ur -x '\po' apt-0.7.1/doc/apt-get.8.xml apt-0.7.1.jd/doc/apt-get.8.xml --- apt-0.7.1/doc/apt-get.8.xml 2006-12-14 11:33:38.000000000 +0100 +++ apt-0.7.1.jd/doc/apt-get.8.xml 2007-05-03 17:09:39.000000000 +0200 @@ -42,6 +42,7 @@ <arg>dselect-upgrade</arg> <arg>install <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> <arg>remove <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> + <arg>purge <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> <arg>source <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> <arg>build-dep <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg> <arg>check</arg> @@ -152,6 +153,11 @@ installed instead of removed.</para></listitem> </varlistentry> + <varlistentry><term>purge</term> + <listitem><para><literal>purge</literal> is identical to <literal>remove</literal> except that packages are + removed and purged.</para></listitem> + </varlistentry> + <varlistentry><term>source</term> <listitem><para><literal>source</literal> causes <command>apt-get</command> to fetch source packages. APT will examine the available packages to decide which source package to