DEV Community

Pavel Ustyugov
Pavel Ustyugov

Posted on

How to remove php from Ubuntu 22.04

Sometimes you may need to completely remove php and all its packages from your ubuntu computer or server.

To do this, just type this line.

sudo apt-get purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`

Enter fullscreen mode Exit fullscreen mode

Top comments (3)

Collapse
 
_bkeren profile image
''

what is ununtu? did you mean ubuntu?

Collapse
 
itdigger profile image
Pavel Ustyugov

are you smart

Collapse
 
_bkeren profile image
''

nope, a moderator