[Aptitude-devel] Bug#683866: aptitude does not have an autoremove command

Daniel Hartwig mandyke at gmail.com
Sun Aug 5 00:53:08 UTC 2012


On 5 August 2012 06:49, Andrew Pimlott <andrew at pimlott.net> wrote:
> Package: aptitude
> Version: 0.6.8-1
> Severity: wishlist
>
> Dear Maintainer,
>
> aptitude does not have the autoremove command that apt-get has.  There
> does not appear to be any way to uninstall automatically installed
> packages from the command line with aptitude.

Aptitude operates under the principal that you either wish for it to
manage unused packages, or you do not.  The default is the manage
unused packages but this can be changed by setting
Aptitude::Delete-Unused "0".

When managing unused packages any action will cause their removal:

# aptitude markauto -s tf
The following packages will be REMOVED:
  tf{u}
0 packages upgraded, 0 newly installed, 1 to remove and 549 not upgraded.
Need to get 0 B of archives. After unpacking 872 kB will be freed.

Marking the same package auto-installed in the GUI causes it to be
immediately flagged for deletion also.  You see that the equivalent of
apt-get autoremove is included with most commands.

Occasionally the program will miss some packages, but they will be
picked up the next time the program is run:

# aptitude install
The following packages will be REMOVED:
  tf{u}
…

An explicit autoremove command is useful for a user who has
Delete-Unused set false.  In this case it would be equivalent to:

# aptitude -oAptitude::Delete-Unused=1 install

Leaving this report open as wishlist.

> (I don't know if it is a goal to be able to do everything from the
> command line with aptitude, or to mirror every function of apt-get.

Generally it is not our goal to mirror every function of apt-get, that
is not particularly useful.  Aptitude is a high-level interface with
semantics different to the apt-utils: if you need apt-get for a given
task, use apt-get.

Regards



More information about the Aptitude-devel mailing list