0

I'm not sure if it's okay to remove this folder located here C:\ProgramData\chocolatey

This is not related to How to clear Chocolatey cache in the free version? as this did not solve the issue.

hidden folder

Is there a built-in choco command to purge old uninstalled programs.

Nothing in the docs or running the command choco -? leads to believe there's nothing natively to do so.

Here are the contents of my chocolatey folder.

`contents

Then when I run the command choco outdated I get the response Chocolatey has determined 0 package(s) are outdated.

Yet these 3 programs are no longer install, yet remnants of them apps remain.

They were all uninstalled via the choco uninstall app-name command.

4
  • That didn't work so this is not a duplicate. Please remove that tag so I can get a different answer.
    – Ste
    Jul 15, 2019 at 20:33
  • This question is currently not closed. There is nothing preventing anyone from submitting an answer to this question other than somebody not actually have an answer to your question. A single close vote will expire automatically after several days.
    – Ramhound
    Jul 15, 2019 at 20:39
  • Could you please specify how exactly solution in the suggested question "didn't work"? So people can suggest something else. Aug 5, 2019 at 11:29
  • Why would that be useful? I don't know why it didn't work and if it didn't work then it's not related to that issue. You all can keep marking this as a duplicate.. But it is NOT!
    – Ste
    Aug 5, 2019 at 20:03

2 Answers 2

1

The built-in choco command to purge old uninstalled programs is a premium (paid) feature:

choco optimize

But there exists a free alternative: How to clear Chocolatey cache in the free version?

3
  • It's hard to know if that paid for feature will remove leftovers from there. Do you have it to check if this is so? The link you posted didn't do anything to the contents of that folder apart from adding another one choco-cleaner.0.0.5.2. Thanks though.
    – Ste
    Jul 15, 2019 at 12:02
  • I do not have Chocolatey premium, no. Did you run the cleaner? \ProgramData\chocolatey\lib\choco-cleaner\tools\Choco-Cleaner-manual.bat It specifically claims it will clean unused cached packages. Although I'm afraid it won't clean up after itself, once uninstalled.
    – 3ICE
    Jul 15, 2019 at 12:04
  • I followed that thread exactly how the answer was written. Choco-Cleaner finished deleting unnecessary Chocolatey files and saved you 22,412 KB! but no old installed folders removed.
    – Ste
    Jul 15, 2019 at 12:07
0

The .chocolatey folder is one that is used by Chocolatey directly to store important information about packages/applications that were installed via Chocolatey. It is not recommended to you remove/alter this folder or any of it's contents.

You can run the choco outdated command to get a list of packages that are out of date based on available upstream packages. I am not sure that this is exactly what you are looking for or not, but if you can elaborate on exactly what you mean by "purge old uninstalled programs" I am confident that we can get you to where you want.

3
  • Thanks, Gary, I've updated my OP to show what I got from that command with more info on the contents of the .chocolatey folder.
    – Ste
    Jul 15, 2019 at 8:45
  • Were the programs that you mention, i.e. keycastow, sox.portable, and wget uninstalled via Chocolatey, or were they directly uninstalled/removed from your machine? Jul 15, 2019 at 8:48
  • They were uninstalled via the choco uninstall route. Added to OP too.
    – Ste
    Jul 15, 2019 at 9:31

Not the answer you're looking for? Browse other questions tagged .