Skip to content

Commit aebb895

Browse files
committed
(GH-378) Add uninstall process
1 parent af3d66e commit aebb895

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Web/InstallBoxstarter.cshtml

+24
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,27 @@ CINST Boxstarter
4141
<pre>
4242
iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); Get-Boxstarter -Force
4343
</pre>
44+
45+
<h2>Uninstalling Boxstarter</h2>
46+
47+
<p>If you need to remove Boxstarter from your system, run code below in a PowerShell console:</p>
48+
49+
<pre>
50+
# Remove the Chocolatey packages in a specific order!
51+
'Boxstarter.Azure', 'Boxstarter.TestRunner', 'Boxstarter.WindowsUpdate', 'Boxstarter',
52+
'Boxstarter.HyperV', 'Boxstarter.Chocolatey', 'Boxstarter.Bootstrapper', 'Boxstarter.WinConfig', 'BoxStarter.Common' |
53+
ForEach-Object { choco uninstall $_ -y }
54+
55+
# Remove the Boxstarter data folder
56+
Remove-Item -Path (Join-Path -Path $env:ProgramData -ChildPath 'Boxstarter') -Recurse -Force
57+
58+
# Remove Boxstarter from the path in both the current session and the system
59+
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -notlike '*Boxstarter*' }) -join ';'
60+
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, 'Machine')
61+
62+
# Remove Boxstarter from the PSModulePath in both the current session and the system
63+
$env:PSModulePath = ($env:PSModulePath -split ';' | Where-Object { $_ -notlike '*Boxstarter*' }) -join ';'
64+
[Environment]::SetEnvironmentVariable('PSModulePath', $env:PSModulePath, 'Machine')
65+
</pre>
66+
67+
Boxstarter installs [Chocolatey](https://chocolatey.org) and this needs to be [uninstalled](https://chocolatey.org/docs/uninstallation) separately.

0 commit comments

Comments
 (0)