Skip to content

Need help restoring .nupkg files having zero size #2765

Answered by TheCakeIsNaOH
jpluimers asked this question in Q&A
Discussion options

You must be logged in to vote

It's a known issue that Chocolatey can't handle zero size or corrupted .nupkg files.
#717

So, I'd suggest this:

  1. Writing out a list of commands to run to reinstall the packages. Run the below command, and copy the output to a text file or similar.
Get-ChildItem $env:ChocolateyInstall/lib/*/*.nupkg | % {
    Write-Host "choco install $($_.basename) --skip-powershell"
}
  1. Then delete all of the zero length .nupkg files. There is a oneliner in the linked issue.
  2. Then run the commands copied previously to re-install the packages.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@jpluimers
Comment options

Comment options

You must be logged in to vote
2 replies
@jpluimers
Comment options

@jpluimers
Comment options

Answer selected by jpluimers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants