I am trying to see whether I have installed certain packages. I figured this would work

apt-get list --installed | grep "xxx"

but it doesn't. Any ideas?

Thanks in advance


Try this:

apt list --installed | grep "xxx"

Edit: Alternatively, as Chev_603 wrote, you can do this:

dpkg -l | grep "xxx"

Edit 2: about apt list, see man apt. Looking at man apt-get shows that apt-get does not have the list --installed option.

  • 3
    Or you can do dpkg -l|grep "xxx" – Chev_603 Oct 20 '19 at 5:29
  • 2
    I would recommend to add links or references to man-pages man apt-get and man apt. They state that list is supported by apt, not by apt-get. – N0rbert Oct 20 '19 at 7:55
  • 1
    @Chev_603: dpkg -l '*xxx*' is enough. – emk2203 Aug 14 '20 at 13:22

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.