<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Choco_uninstall</id>
	<title>Choco uninstall - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Choco_uninstall"/>
	<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Choco_uninstall&amp;action=history"/>
	<updated>2026-04-19T17:32:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://tech.uvoo.io/index.php?title=Choco_uninstall&amp;diff=5486&amp;oldid=prev</id>
		<title>Busk: Created page with &quot;# Choco Uninstall ``` # Ensure the script is running as administrator if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInR...&quot;</title>
		<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Choco_uninstall&amp;diff=5486&amp;oldid=prev"/>
		<updated>2025-01-15T17:08:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;# Choco Uninstall ``` # Ensure the script is running as administrator if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInR...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;# Choco Uninstall&lt;br /&gt;
```&lt;br /&gt;
# Ensure the script is running as administrator&lt;br /&gt;
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] &amp;quot;Administrator&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
    Write-Host &amp;quot;Please run this script as an administrator.&amp;quot;&lt;br /&gt;
    exit&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Stop Chocolatey processes (if any)&lt;br /&gt;
Write-Host &amp;quot;Stopping Chocolatey processes...&amp;quot;&lt;br /&gt;
Stop-Process -Name &amp;quot;choco*&amp;quot; -Force -ErrorAction SilentlyContinue&lt;br /&gt;
&lt;br /&gt;
# Remove Chocolatey installation directory&lt;br /&gt;
Write-Host &amp;quot;Removing Chocolatey installation directory...&amp;quot;&lt;br /&gt;
Remove-Item -Recurse -Force &amp;quot;C:\ProgramData\chocolatey&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Remove Chocolatey environment variables&lt;br /&gt;
Write-Host &amp;quot;Removing Chocolatey environment variables...&amp;quot;&lt;br /&gt;
[System.Environment]::SetEnvironmentVariable(&amp;quot;ChocolateyInstall&amp;quot;, $null, [System.EnvironmentVariableTarget]::Machine)&lt;br /&gt;
[System.Environment]::SetEnvironmentVariable(&amp;quot;ChocolateyLastPathUpdate&amp;quot;, $null, [System.EnvironmentVariableTarget]::Machine)&lt;br /&gt;
&lt;br /&gt;
# Remove Chocolatey from the PATH environment variable&lt;br /&gt;
Write-Host &amp;quot;Removing Chocolatey from the PATH environment variable...&amp;quot;&lt;br /&gt;
$envPath = [System.Environment]::GetEnvironmentVariable(&amp;quot;Path&amp;quot;, [System.EnvironmentVariableTarget]::Machine)&lt;br /&gt;
$envPath = $envPath -replace &amp;quot;;C:\\ProgramData\\chocolatey\\bin&amp;quot;, &amp;quot;&amp;quot;&lt;br /&gt;
[System.Environment]::SetEnvironmentVariable(&amp;quot;Path&amp;quot;, $envPath, [System.EnvironmentVariableTarget]::Machine)&lt;br /&gt;
&lt;br /&gt;
rm -r 'C:\ProgramData\ChocolateyHttpCache\'&lt;br /&gt;
&lt;br /&gt;
Write-Host &amp;quot;Chocolatey has been uninstalled successfully.&amp;quot;&lt;br /&gt;
```&lt;/div&gt;</summary>
		<author><name>Busk</name></author>
	</entry>
</feed>