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