Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to do something like

aptitude -P install mypackage*

which should install all packages which start with "mypackage". How can I do this with aptitude?

share|improve this question
    
I don't have the time to write up a proper answer right now, but you may find Searching for strings helpful. –  Michael Kjörling May 20 '13 at 11:08
    
The * wildcard is a function of the shell, not of aptitude. You can configure your shell to expand the package list. –  Marco May 20 '13 at 11:09
2  
Try ~n to get that functionality. –  schaiba May 20 '13 at 11:11

2 Answers 2

aptitude install '~n ^mypackage'

With multi-arch, you probably want to limit it to one architecture:

aptitude install '~n ^mypackage (~r amd64 | ~r all)'
share|improve this answer

This should do what you want:

aptitude search '^mypackage' | awk '{print $2}' | xargs aptitude install
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.