Chocolatey uninstall windows 10

Uninstalling Chocolatey

Should you decide you don’t like Chocolatey, you can uninstall it simply by removing the folder (and the environment variable(s) that it creates). Since it is not actually installed in Programs and Features, you don’t have to worry that it cluttered up your registry (however that’s a different story for the applications that you installed with Chocolatey or manually).

Folder

Most of Chocolatey is contained in C:\ProgramData\chocolatey or whatever $env:ChocolateyInstall evaluates to. You can simply delete that folder.

You might first back up the sub-folders lib and bin just in case you find undesirable results in removing Chocolatey. Bear in mind not every Chocolatey package is an installer package, there may be some non-installed applications contained in these subfolders that could potentially go missing. Having a backup will allow you to test that aspect out.

Environment Variables

There are some environment variables that need to be adjusted or removed.

  • ChocolateyInstall
  • ChocolateyToolsLocation
  • ChocolateyLastPathUpdate
  • PATH (will need updated to remove)

Script

There are no warranties on this script whatsoever, but here is something you can try:

This will remove Chocolatey and all packages, software, and configurations in the Chocolatey Installation folder from your machine. Everything will be GONE. This is very destructive. DO NOT RUN this script unless you completely understand what the intention of this script is and are good with it. If you mess something up, we cannot help you fix it.

Seriously, this script may destroy your machine and require a rebuild. It may have varied results on different machines in the same environment. Think twice before running this.

Click the red button below to reveal the uninstall scripts.

If you also intend to delete the Chocolatey directory, remove the -WhatIf switch from the Remove-Item call near the bottom:

$VerbosePreference = 'Continue'
if (-not $env:ChocolateyInstall) {
    $message = @(
        "The ChocolateyInstall environment variable was not found."
        "Chocolatey is not detected as installed. Nothing to do."
    ) -join "`n"

    Write-Warning $message
    return
}

if (-not (Test-Path $env:ChocolateyInstall)) {
    $message = @(
        "No Chocolatey installation detected at '$env:ChocolateyInstall'."
        "Nothing to do."
    ) -join "`n"

    Write-Warning $message
    return
}

<#
    Using the .NET registry calls is necessary here in order to preserve environment variables embedded in PATH values;
    Powershell's registry provider doesn't provide a method of preserving variable references, and we don't want to
    accidentally overwrite them with absolute path values. Where the registry allows us to see "%SystemRoot%" in a PATH
    entry, PowerShell's registry provider only sees "C:\Windows", for example.
#>
$userKey = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey('Environment',$true)
$userPath = $userKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString()

$machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\',$true)
$machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString()

$backupPATHs = @(
    "User PATH: $userPath"
    "Machine PATH: $machinePath"
)
$backupFile = "C:\PATH_backups_ChocolateyUninstall.txt"
$backupPATHs | Set-Content -Path $backupFile -Encoding UTF8 -Force

$warningMessage = @"
    This could cause issues after reboot where nothing is found if something goes wrong.
    In that case, look at the backup file for the original PATH values in '$backupFile'.
"@

if ($userPath -like "*$env:ChocolateyInstall*") {
    Write-Verbose "Chocolatey Install location found in User Path. Removing..."
    Write-Warning $warningMessage

    $newUserPATH = @(
        $userPath -split [System.IO.Path]::PathSeparator |
            Where-Object { $_ -and $_ -ne "$env:ChocolateyInstall\bin" }
    ) -join [System.IO.Path]::PathSeparator

    # NEVER use [Environment]::SetEnvironmentVariable() for PATH values; see https://github.com/dotnet/corefx/issues/36449
    # This issue exists in ALL released versions of .NET and .NET Core as of 12/19/2019
    $userKey.SetValue('PATH', $newUserPATH, 'ExpandString')
}

if ($machinePath -like "*$env:ChocolateyInstall*") {
    Write-Verbose "Chocolatey Install location found in Machine Path. Removing..."
    Write-Warning $warningMessage

    $newMachinePATH = @(
        $machinePath -split [System.IO.Path]::PathSeparator |
            Where-Object { $_ -and $_ -ne "$env:ChocolateyInstall\bin" }
    ) -join [System.IO.Path]::PathSeparator

    # NEVER use [Environment]::SetEnvironmentVariable() for PATH values; see https://github.com/dotnet/corefx/issues/36449
    # This issue exists in ALL released versions of .NET and .NET Core as of 12/19/2019
    $machineKey.SetValue('PATH', $newMachinePATH, 'ExpandString')
}

# Adapt for any services running in subfolders of ChocolateyInstall
$agentService = Get-Service -Name chocolatey-agent -ErrorAction SilentlyContinue
if ($agentService -and $agentService.Status -eq 'Running') {
    $agentService.Stop()
}
# TODO: add other services here

Remove-Item -Path $env:ChocolateyInstall -Recurse -Force -WhatIf

'ChocolateyInstall', 'ChocolateyLastPathUpdate' | ForEach-Object {
    foreach ($scope in 'User', 'Machine') {
        [Environment]::SetEnvironmentVariable($_, [string]::Empty, $scope)
    }
}

$machineKey.Close()
$userKey.Close()

Additionally, the below code will remove the environment variables pointing to the tools directory that was managed by Chocolatey.
If you want to remove the actual directory from disk, remove the -WhatIf switch from the Remove-Item call below as well.

if ($env:ChocolateyToolsLocation -and (Test-Path $env:ChocolateyToolsLocation)) {
    Remove-Item -Path $env:ChocolateyToolsLocation -WhatIf -Recurse -Force
}

foreach ($scope in 'User', 'Machine') {
    [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, $scope)
}

Need Space in PC or only want to remove or uninstall Chocolatey On PC ( Windows 7, 8, 10, and Mac )? but how to, after it still having files in C: drive? If the application run on the pc, windows 7, 8, & 10 so you can uninstall using Control Panel or CMD Or If this applicaion run in Mac so you know that how to uninstall in MAC. With this article, you will able to delete or kick out all of those files also after uninstalling the Chocolatey.

Are you bored, or tired of using Chocolatey? Now, wanna kick-off this software from your PC ( Windows 7, 8, 10, and Mac )? There is no condition to follow up before installing, so, you can remove it without getting any confusion about it.

There are 10 methods that users can adapt if they want to uninstall Chocolatey :

Method #1

  • Go to Start Menu, then click on the Control Panel.
  • In Control Panel, under programs, go through the list of the ones that are installed on your computer
  • Right-click on Chocolatey, and then click on uninstall a program
  • Follow the prompt on the screen, and you will get to see a progress bar that will take you to remove the Chocolatey from the computer.
Chocolatey

Chocolatey

Method #2

The second method involves uninstaller.exe, through which Chocolatey can be uninstalled. Just follow the instructions below to execute this step:

  • Go to the installation folder of Chocolatey.
  • Find a file that is named uninstall.exe or unins000.exe
  • Double click on the file, and then follow the instructions that appear on the screen.
Chocolatey

Chocolatey

Method #3

The third method involves System Restore. For those who don’t know, System Restore is a utility, which helps the user restore their system to its previous state. System Restore removes all those programs, which interfere with the operation and performance of the computer.

Chocolatey

Chocolatey

Chocolatey

If you have created a system restore point before you installed Chocolatey, then you can use this software to restore the system, and remove such unwanted programs. However, before you do so, make sure that you save all the important data.Follow the steps below to know more from this method:

  • Close all the files and programs, which are currently running on your PC
  • Open Computer from the desktop, and then select Properties
  • System Window will open
  • On the left side and click on System Protection
  • System Properties will open.
  • Then do click on the option of System Restore, and a new window will again open.
  • Now, choose the ‘different restore point’ option, and click on Next.
  • You have to select a date and time from the given options; when you select a date, the drivers that you installed after the chosen date won’t work.
  • Click on Finish and then Confirm the ‘Restore Point’ on the screen.
  • When you click Yes to confirm, the Chocolatey would be uninstalled.

Method #4

If you have an antivirus, then you can use it to uninstall Chocolatey.There is much malware or Chocolatey software in the computer applications that we download nowadays. They have become very difficult to remove from the system, like Trojan and spyware.

  • If you cannot remove Chocolatey with the above methods.
  • It means that there is malware or Chocolatey in it, and only a good antivirus can be used for removing it.

You can either download Norton Antivirus or AVG antivirus, as these are reputable software and will surely remove the malware, Chocolatey on the system.

Chocolatey

Method #5

If you want to uninstall Chocolatey, then you can do so using Command Displayed in the Registry. A registry is a place where all the settings of Windows, along with information, are stored. This also includes the command to uninstall a software or program.

You can try this method with Chocolatey as well, but it is a very risky method. If you make any mistake and delete the wrong information, then the system is most likely to crash. It would become difficult for you to bring it back from deletion.

Chocolatey

To execute this method, To follow the steps given below:

  • Hold Windows + R together, and then Run command
  • When the command box opens, type Regedit in the box and then click on OK
  • You have to navigate and find the registry key for the Chocolatey
  • You will see an uninstall string on the next window; double click on it, and also copy ‘Value Data’
  • Again hold Windows + R keys, and run the Command; paste the value data that you just copy and click on OK

Follow what comes on the screen and then uninstall Chocolatey.

Method #6

The seventh method is to uninstall the Chocolatey using a third-party uninstaller.

At times, those who don’t have any knowledge of computer language, won’t be able to manually uninstall the software fully.

Many files occupy the hard disk of the computer, so it is best to use third-party software to uninstall them.

Chocolatey

Method #7

There are some codes that users can type into the command prompt, and they would be able to uninstall the Chocolatey. For example, if they want to remove the package, then just type.

sudo apt-get remove Chocolatey

If you want to uninstall Chocolatey and its dependencies as well, then type:

sudo apt-get remove –auto-remove Chocolatey

For those who don’t know, some of the dependencies of Chocolatey are GCC-5, libc6, libgcc1, Chocolatey dev, and gc++-5.

Chocolatey

Method #8

If the user wants to remove the configuration and data files of Chocolatey, then they need to run the following code on the Command Prompt:

sudo apt-get purge Chocolatey

Chocolatey

Method # 9

It depends on you that are you willing to kick-out the data or you want to remove the configuration data or data files, along with the dependencies, then the following code is most likely to work for you:

sudo apt-get auto-remove -purge Chocolatey

Chocolatey

To uninstall Chocolatey on mac because anytime we need space or only want to remove from pc due to some viruses and also many problems which are needed to remove or uninstall from pc.

So I will show you some steps of uninstalling Chocolatey on the mac so follow my this step or method if you have still confusion so you may contact with us for uninstall of Chocolatey on pc or mac.

How to Uninstall Chocolatey on Mac?

For uninstalling Chocolatey on the mac so as I told you that there is a simple method to uninstall apps on mac. As there are installed some apps on your Mac and now you want to remove or uninstall from your pc successfully and want to install some other apps on my mac so follow my these steps to uninstall Chocolatey on mac.

Method #1

In method 1, you have to open mac on your pc as I’m showing in the image follow the images to uninstall Chocolatey on your mac.

Chocolatey

In the image, there is a Chocolatey app on your mac dashboard and now we have to uninstall it from our mac we will uninstall this app and will remove it in of mac now double-click-on-app showing in the image.

Chocolatey

Now you double-clicked on the app mac will ask that are you sure to uninstall Chocolatey click on the Delete button so go to Trash of mac to uninstall completely from mac. Showing in image trash bin click on trash bin and go inside there will be Chocolatey which we had to delete before so have to uninstall completely from mac.

Chocolatey

Not right-click on trash to remove all data or app which we had uninstalled before seeing in the image. Click on Empty Trash the whole data which is in the trash will auto remove successfully.

Chocolatey

Now we uninstalled Chocolatey on the mac so as you see that how to uninstall or remove any app on the mac so if you liked this so share once. This method doesn’t require any antivirus or uninstaller software from them we are to uninstall.

I described only a simple method of uninstalling Chocolatey on mac. This method more people are using but some people take it is too hard uninstalling in mac but in this step, anyone can understand this simple method.

How To Install?

For those who don’t know much about Chocolatey, they might lean more towards uninstalling it. These Chocolatey create an environment, where users can create a high GPU-accelerated application. If you want to install this Chocolatey, then make sure that your system is compatible with it.

Firstly, verify that the system you are using has a Chocolatey capable GPU, and then download the Chocolatey. Install it, and then test that the software runs smoothly on the system. If it doesn’t run smoothly, then it could be because its communication with the hardware is corrupted.

Chocolatey

Chocolatey

Chocolatey

Conclusion

There are other methods of uninstalling the Chocolatey as well as in pc or windows, but these could be difficult for those, who don’t have much technical expertise. Execute these methods, and they will surely work. These methods don’t require the user to have much knowledge of the technical side of an operating system. They can follow simple steps and uninstall Chocolatey.

 chocolatey

 94

 1 min

Refer to Chocolatey Official website How to uninstall

Uninstall Chocolatey

Uninstall step 1. Delete Chocolatey Folder

Just directly delete the Chocolatey folder, ususally it will be at C:\ProgramData\chocolatey

if you are not sure where it is, you can use following command.

$env:ChocolateyInstall 

◎ Fig1. Check Chocolatey location

fig2

◎ Fig2. Delete Chocolatey Folder

Uninstall step 2. Remove chocolately from environment

After deleted the Chocolatey folder, you need to remove chocolately from environment.

fig3

◎ Fig3. Remove Chocolatey from Environment step 1

fig4

◎ Fig4. Remove Chocolatey from Environment step 2

fig5

◎ Fig5. Remove Chocolatey from Environment step 3

fig6

◎ Fig6. Remove Chocolatey from Environment step 4

The Official docs indicate there are four following subject need to be removed.

ChocolateyInstall

ChocolateyToolsLocation

ChocolateyLastPathUpdate

PATH (will need updated to remove)

But when I doing the remove, I didn’t see the ChocolateyLastPathUpdate.

updatedupdated2023-11-282023-11-28

windows

chocolatey

One, Chocolatey profile

The Package Manager for Windows is used to automatically manage software (install, update, uninstall). Chocolatey website

Two, installation requirements

  • Windows 7+ / Windows Server 2003+
  • PowerShell v2+
  • .NET Framework 4+ (The installation process will detect, if not installed will automatically download the installation)

3. Start installation

Run PowerShell with administrator rights to check and set execution policies

  • check
PS C:\> Get-ExecutionPolicy
Copy the code

If Restricted is returned, you need to change it to Bypass or AllSigned

  • To change the

You can use one of the following two methods

PS C:\> Set-ExecutionPolicy AllSigned
Copy the code

or

PS C:\> Set-ExecutionPolicy Bypass -Scope Process
Copy the code
  • check

After installation, recheck to see if the changes are complete

PS C:\> Get-ExecutionPolicy
Copy the code
  • The installation

Set the execution policy and download and execute the installation script

PS C:\> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Copy the code

If the execution policy has changed, it is also possible to download and execute directly

PS C:\> iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Copy the code

Wait for the installation to complete, then you can use Choco Version to view the installation results.

  • See the help

Use the choco -? Check the help documentation. Viewing online Documents

Install the software with Chocolatey

View supported installation packages

  • Common commands

Search Same as list install Install uninstall Uninstall upgrade Update Download

Five, the unloading

To uninstall Chocolatey, simply delete the folder where it was installed and remove the corresponding environment variables. Other software installed using Chocolatey will need to be removed manually if it needs to be removed.

  1. Deleting environment variablesChocolateyInstallCorresponding installation folder. The default folder isC:\ProgramData\chocolatey
  2. Delete the environment variable ChocolateyInstall
  3. Delete the environment variable ChocolateyToolsLocation, which is the location where some tools are installed
  4. Delete the environment variable ChocolateyLastPathUpdate
  5. Update environment variable PATH to removeChocolateyRelated Configurations

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Удобный календарь для планирования для windows
  • Wifi driver for windows 7 for asus
  • 8024402c ошибка обновления windows server 2008 r2
  • Стоит ли очищать обновления windows
  • Windows 7 sysprep не работает