Ubuntu uninstall nginx,包括重新安装

时间:2025-03-24 07:52:27

To recreate it, first uninstall using purge to remove even configuration files and records:

apt-get purge nginx nginx-common nginx-full

then reinstall:

apt-get install nginx

if above doesn't work for you

You can also try using --force-confmiss option of dpkg.

sudo dpkg --force-confmiss -i /var/cache/apt/archives/nginx-common_*.deb