Trouver la liste des paquets installés sur son système

Je me base sur cet excellent article.

En résumé la commande magique c'est

dpkg --get-selections

Et quand on veut filtrer

dpkg --get-selections | grep php

Ce qui donne ce genre de truc :

libapache2-mod-php5                             install
php-db                                          install
php-pear                                        install
php-sqlite3                                     install
php5                                            install
php5-cli                                        install
php5-common                                     install
php5-gd                                         install
php5-memcache                                   install
php5-mysql                                      install
php5-sqlite                                     install
php5-sqlite3                                    install
php5-xsl                                        install