delete nginx code example Example 1: remove nginx sudo apt-get remove nginx* --purge Example 2: delete nginx sudo apt-get purge nginx nginx-common