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?

  • I don't have the time to write up a proper answer right now, but you may find Searching for strings helpful. – a CVn 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
aptitude install '~n ^mypackage'

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

aptitude install '~n ^mypackage (~r amd64 | ~r all)'

This should do what you want:

aptitude search '^mypackage' | awk '{print $2}' | xargs aptitude install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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