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

Re: aptitude: set all packages auto-installed except given list?



In <[🔎] 20110115110130.GC15639@think.homelan>, Andrei Popescu wrote:
>My usual method of 'cleaning' the system was to set all installed
>packages to auto-installed and then mark one by one the ones I need to
>keep.
>
>    aptitude --schedule-only markauto ~i
>
>Seems to be doing the first part, but I can't convince aptitude to
>unmark my list (which I processed to not contain unneeded space and
>newlines):
>
>    aptitude unmarkauto < pkg.list
>
>has no effect

The redirection operator you've used ('<') opens the named file, and replaces 
file descriptor 0 (stdin), with the descriptor of the just opened file, just 
before running the command.  Aptitude doesn't read packages to operate on from 
stdin, so it's not surprising this didn't have the effect you wanted.

(aptitude unmarkauto $(cat pkg.list)) should do what you want, and extra 
newlines and spaces wouldn't matter even if the file contained them.  
-- 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss@iguanasuicide.net                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'
http://iguanasuicide.net/                    \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: