[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#490962: apt: Removing many packages after installing them temporarily



Package: apt
Version: 0.7.14+b1
Severity: wishlist

When I e.g. want to build a package myself, I often have to install build-depends 
packages, which I want to remove again afterwards. I would like apt-get to have a 
convenient way to do this, so that the user doesn't have to keep a list of the 
temporarily installed packages, and then uninstall them manually. This is also 
convenient in any situation when one wants a set of packages that are not all 
dependent on one package (if they were, then auto-remove would works fine after 
having uninstalled the one package that depended on the others.

One way would be to define a self-chosen tag when installing something:

apt-get --def-tag MYTAG install

After that one could uninstall all the packages by running something like

dpkg --purge --tag MYTAG

In addition, a function --listtags would be convenient. It could list all tags 
that are defined, and the packages corresponding to each tag.

It could happen that it is not possible to uninstall alle the packages that 
correspond to a specific tag, because some other package depends on some of them. 
In that case dpkg should uninstall the packages that are uninstallable and leave 
the others. A preference setting could indicate if the tag definition should be 
deleted when the uninstallation of all the packages corresponding to the tag could 
not be fully complete.

I guess this could be done by running apt-get once with --print-uris together with 
some scripting to get a list of the packages that are going to be installed. 
That way one could run 'dpkg --purge $(cat list_of_debs.txt)' afterwards. But it 
would be simpler to have this functionality integrated in apt-get/dpkg.

Best regards,
Torquil Sørensen


-- Package-specific info:

-- (/etc/apt/preferences present, but not submitted) --


-- (/etc/apt/sources.list present, but not submitted) --


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (650, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apt depends on:
ii  debian-archive-keyring   2008.04.16+nmu1 GnuPG archive keys of the Debian a
ii  libc6                    2.7-12          GNU C Library: Shared libraries
ii  libgcc1                  1:4.3.1-6       GCC support library
ii  libstdc++6               4.3.1-6         The GNU Standard C++ Library v3

apt recommends no packages.

-- no debconf information



Reply to: