From f33df8c77bfe5800ce9072992e4342c1401d614d Mon Sep 17 00:00:00 2001 From: Silesh K Nair Date: Tue, 30 Jul 2024 00:13:44 +0000 Subject: [PATCH] Delete user ubuntu if exists --- bash_profile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bash_profile b/bash_profile index 540201f..d21f2eb 100644 --- a/bash_profile +++ b/bash_profile @@ -24,6 +24,10 @@ test -e ~/vhdresize.txt && rm ~/vhdresize.txt test -e ~/shutdown.cmd && rm ~/shutdown.cmd figlet -t -k -f /usr/share/figlet/mini.flf "Welcome to LinuxmintWSL" | lolcat echo -e "\033[33;7mDo not interrupt or close the terminal window till script finishes execution!!!\n\033[0m" +getent passwd ubuntu >/dev/null && ( + userdel ubuntu + rm -rf /home/ubuntu +) if [ "$disksize" -le 274877906944 ]; then echo -e ${grn}"LinuxmintWSL's VHD has a default maximum size of 256GB. Disk space errors which occur if size exceeds 256GB can be fixed by expanding the VHD. Would you like to resize your VHD? More information on this process is available at \033[36mhttps://docs.microsoft.com/en-us/windows/wsl/vhd-size\033[32m."${txtrst} | fold -sw $width