diff --git a/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh b/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh index 7abb9a486..4a2fa7f1c 100755 --- a/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh +++ b/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh @@ -8,7 +8,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" current_user=$(whoami) if [ $current_user != "root" ]; then - echo "$(basename $0) uninstallation script requires superuser privileges to run" + echo "$(basename "$0") uninstallation script requires superuser privileges to run" exit 1 fi diff --git a/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh b/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh index 7b9fc7320..b03efa61e 100755 --- a/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh +++ b/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh @@ -8,7 +8,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" current_user=$(whoami) if [ $current_user != "root" ]; then - echo "`basename "$0"` uninstallation script requires superuser privileges to run" + echo "$(basename "$0") uninstallation script requires superuser privileges to run" exit 1 fi @@ -17,9 +17,6 @@ dotnet_pkg_name_suffix="com.microsoft.dotnet" dotnet_install_root="/usr/local/share/dotnet" dotnet_path_file="/etc/paths.d/dotnet" -# nuget paths -nuget_root=~/.nuget - remove_dotnet_pkgs(){ installed_pkgs=($(pkgutil --pkgs | grep $dotnet_pkg_name_suffix)) @@ -34,11 +31,8 @@ remove_dotnet_pkgs [ "$?" -ne 0 ] && echo "Failed to remove dotnet packages." && exit 1 echo "Deleting install root - $dotnet_install_root" -rm -rf $dotnet_install_root -rm -f $dotnet_path_file - -echo "Deleting NuGet package location" -rm -rf $nuget_root +rm -r "$dotnet_install_root" +rm "$dotnet_path_file" echo "dotnet packages removal succeeded." exit 0