Fixes issue #824 (cherry picked from commit 0facc01420efcf3bc5b7e3dcf50a5673e2d1b234)
@@ -713,7 +713,8 @@ fi
# Excluding packages
software=$(echo "$software" | sed -e "s/apache2.2-common//")
if [ "$nginx" = 'no' ]; then
- software=$(echo "$software" | sed -e "s/\bnginx\b/ /")
+ software=$(echo "$software" | sed -r -e 's/(\s|^)nginx(\s|$)/ /')
+
fi
if [ "$apache" = 'no' ]; then
software=$(echo "$software" | sed -e "s/apache2 //")