lucyllewy / one-script-wsl2-systemd

The one-script variant of the systemd hack for WSL2
MIT License
231 stars 38 forks source link

How to revert changes brought by this script #15

Closed YangHanlin closed 2 years ago

YangHanlin commented 2 years ago

Is there a way to uninstall this script, i.e. to revert the changes (on both Windows and WSL sides) brought by this script? There is seemingly no separate uninstall script nor an -Uninstall option in Install.ps1. Are there any plans to add such feature?

lucyllewy commented 2 years ago

to uninstall on the Windows side, you need to delete the scheduled tasks (located in windows task scheduler, within its powershell folder), and uninstall Gpg4Win if you installed it. |If you used the custom kernel then you want to delete the line in C:\Users\your-username\.wslconfig that begins with kernel=. On the linux side delete the file /etc/profile.d/00-wsl2-systemd.shand edit /etc/wsl.conf to delete the line that begins with command=.

YangHanlin commented 2 years ago

to uninstall on the Windows side, you need to delete the scheduled tasks (located in windows task scheduler, within its powershell folder), and uninstall Gpg4Win if you installed it. |If you used the custom kernel then you want to delete the line in C:\Users\your-username\.wslconfig that begins with kernel=. On the linux side delete the file /etc/profile.d/00-wsl2-systemd.shand edit /etc/wsl.conf to delete the line that begins with command=.

@diddledani Thanks for your kind reply!