What directory does chocolatey install commands to?

The answer is, it depends :-)

Most package contents will be installed to the chocolatey directory, which you can find at C:\ProgramData\chocolatey\lib. For example, in the case of python3 you will find the exe in C:\ProgramData\chocolatey\lib\python3\tools.

In addition, you will find a shim exe located at C:\ProgramData\chocolatey\bin for python. This location is already contained within your path, so you should already have access to it without making any other changes.


You can run this command for an installed package

choco list --local-only --exact python --trace

Which will have an output like

Chocolatey v0.10.15
 Operating System Version Number: 10.0.18363.0
Initializing global mutex
Waiting on the mutext handle for 2000 milliseconds
Entered mutex to deserialize 'C:\ProgramData\chocolatey\.chocolatey\python.2.7.11\.registry'
Initializing global mutex
Waiting on the mutext handle for 2000 milliseconds
Entered mutex to deserialize 'C:\ProgramData\chocolatey\.chocolatey\python.2.7.11\.files'
python 2.7.11
1 packages installed.

Open the C:\ProgramData\chocolatey\.chocolatey\python.2.7.11\.files and you will see

<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <files>
    <file path="C:\ProgramData\chocolatey\lib\python\python.nupkg" checksum="8217F64EF970491C464DAA20F6BF45F1" />
    <file path="C:\ProgramData\chocolatey\lib\python\python.nuspec" checksum="4F62CF5DD7934CF4C8ED62FE24848C72" />
    <file path="C:\ProgramData\chocolatey\lib\python\tools\chocolateyInstall.ps1" checksum="6EBF6A5BBC8667B7DEE75CA2E0CF2EB4" />
  </files>
</fileSnapshot>

Pointing to C:\ProgramData\chocolatey\lib\python as the installation folder.

Tags:

Chocolatey