Answers:
sudo apt-get remove nginx nginx-common #删除除配置文件外的所有文件。
sudo apt-get purge nginx nginx-common #删除所有内容。
sudo apt-get autoremove #在使用上述任何命令之后,请使用此命令以删除nginx使用的不再需要的依赖项。
apt-get purge功能。
sudo apt-get purge nginx-common
sudo apt-get remove nginx-full nginx-common
rm -rf /etc/nginx也删除conf文件。