How to remove php 5.6
Package named php5
or php5.6
is just a meta-package that pulls one of the available web SAPIs (apache2, fpm or cgi). The easiest way how to remove full stack of packages is to remove php5-common
and/or php5.6-common
package as everything else depends on it, e.g.:
apt-get purge php5-common
The other option would be to use wildcard support in apt-get
and do:
apt-get purge 'php5*'