Re: [really solved] Re: aptitude: set all packages auto-installed except given list?

On Sat, Jan 15, 2011 at 9:41 PM, Andrei Popescu
<andreimpopescu@xxxxxxxxx> wrote:
On Sb, 15 ian 11, 19:42:26, Andrei Popescu wrote:

Actually this only helps cleaning the system of unneeded packages, but
still leaves me with a lot of packages not marked auto, so I had to
apply Javier's hack after all.

Ok, this looks like the best version so far:

aptitude --disable-columns -F %p search '~i!~M' > $PKG_LIST
(in case you're wondering, my list currently has 177 packages)

Restore (as root):
aptitude -o Aptitude::Delete-Unused=false markauto ~i
aptitude -o Aptitude::Delete-Unused=false unmarkauto $(cat $PKG_LIST | tr "\n" " ")
aptitude keep-all

I still don't understand why 'Delete-Unused=false' is necessary with
'unmarkauto' and an additional 'keep-all' is needed, but at least it
When you invoke aptitude unmarkauto ... aptitude has all your packages
with auto mark, so aptitude will want to delete these unused packages
*before* it start with your operation (unmarkauto in this case). I
think it make sense


To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx

Relevant Pages

  • Re: How can I refresh Etch completely?
    ... 150+ "unused" packages, including Gnome. ... Then use aptitude / synaptic to dig through and resolve ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
  • Re: Files piling up in /var/* directories
    ... aptitude autoclean ... The first command removes all obsolete packages from the cache; ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
  • aptitude has poor exit status behaviour
    ... In the course of scripting some aptitude upgrade activity I've found ... Ign etch/main Packages/DiffIndex ... Ign etch/updates/main Packages/DiffIndex ... Err etch/updates/main Packages ...
  • Re: Delete part of metapackage?
    ... example) without deleting or installing the entire KDE ... I'm guessing you are using aptitude to manage the package ... apt-get remove <a metapackage name> ... Then you can remove select packages in aptitude without questions ...
  • How recover from aborted dist-upgrade Stable to Testing (due to apt-listbug bug 585448)
    ... I did aptitude update, aptitude upgrade, then converted my /etc/apt/sources.list ... [SNIP 71 lines] ... The following packages will be REMOVED: ... A package failed to install. ...