Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving choco list with options to show dependencies and sort by date (and more) #1276

Open
arieljannai opened this issue Apr 30, 2017 · 14 comments

Comments

@arieljannai
Copy link

arieljannai commented Apr 30, 2017

Feature request:

  • Add features to choco list:
    • Show the installed apps with their dependencies (maybe as a tree?)
    • Sort the output list by installed date, last updated
    • Check which arguments were used to install an app
    • Show exact installed apps - only apps I actively installed (without dependencies). Useful for saving the list of my installed apps.

I believe it would be very useful 😄

@abejenaru
Copy link

abejenaru commented Apr 30, 2017

+a more verbose one-line output, with Title and Publication date

@boaz001
Copy link

boaz001 commented May 2, 2017

Comment moved to separate issue: #1281

@ferventcoder
Copy link
Member

@boaz001 please file a new issue for this. I'd love to track it, and we like to keep things to one request per issue please. Thanks!

@ferventcoder ferventcoder added this to the 0.10.x milestone May 15, 2017
@Bjego
Copy link

Bjego commented Aug 25, 2020

Well this is pretty old right now.
I've ended up with a powershell helper for uninstalling my packages:

function shouldNotUnInstalled {
  param (
    [String]  $name
  )
  return  $name -like 'chocolatey*' -or
  $name -match 'KB\d+' -or
  $name -like 'vcredist*' -or
  $name -match '\d+'
}

$packages = choco list -lo
foreach ($package in $packages) {
  $packageInfos = $package -split " "
  $packageName = $packageInfos[0]
  if (shouldNotUnInstalled -name $packageName  ) {
    Write-Host "Ignore $packageName"
  }
  else {
    Write-Host "Uninstall $packageName"
    choco uninstall $packageName -y
  }
}

@ferventcoder
Copy link
Member

Try choco info

@Bjego
Copy link

Bjego commented Sep 2, 2020

Try choco info

@ferventcoder when I run

choco info -lo kubernetes-cli

I only get the description of that package and no information about the installation on my machine. Or did I miss a parameter?

@Bjego
Copy link

Bjego commented Sep 2, 2020

I think, if an uninstallation via packages.config would be possible. I won't need this feature. See #533

@ferventcoder
Copy link
Member

Sorry @Bjego I didn't mean that comment for you. Just for the top thread as I came back in here to note that there is choco info for some of these other things.

@Kipjr
Copy link

Kipjr commented Jan 5, 2021

Currently I fix this for installed packages like this:

$packages = Get-ChildItem C:\ProgramData\chocolatey\lib\ -Recurse  *.nuspec | select fullname,name 
foreach($p in $packages){
        [XML]$xml=get-content $p.fullname
        $dependencies = $xml.package.metadata.dependencies.dependency
        foreach($d in $dependencies){
	        $obj = New-Object -TypeName psobject
	        $obj | Add-Member -MemberType NoteProperty -name package  -Value $xml.package.metadata.id
	        $obj | Add-Member -MemberType NoteProperty -name packageversion  -Value $xml.package.metadata.version
	        $obj | Add-Member -MemberType NoteProperty -name dependency  -Value  $d.id
	        $obj | Add-Member -MemberType NoteProperty -name dependencyversion  -Value  $d.version
	        $obj
        }
}

For online search (package not installed locally) I use a combination of choco info and regex to find the source. Then I use invoke-webrequest to retrieve the .nuspec file

package                    packageversion      dependency                         dependencyversion
-------                    --------------      ----------                         -----------------
git                        2.29.2.3            git.install                        [2.29.2.3]
git.install                2.29.2.3            chocolatey-core.extension          1.3.3
git.install                2.29.2.3            chocolatey                         0.10.7

@nascentt
Copy link

still no way to get the dependencies of a choco package?
cant see dependencies in chocoalteygui either?

@akirayamamoto
Copy link

This will show all packages dependencies. Execute in PowerShell:

Get-ChildItem C:\ProgramData\chocolatey\lib -Recurse -Name "*.nuspec" | % { Select-String "<dependency" $_ }

https://superuser.com/a/1582307/146085

@superbonaci
Copy link

superbonaci commented Jul 6, 2023

This bug is for packages that are already installed, but what if I want to know the dependencies of some package and version which is not installed?

Example, list dependencies for Chocolatey GUI 2.1.0, having some older version of it installed, or none at all. This is what's really useful, if you have it installed you may have your install broken already.

@pfremy
Copy link

pfremy commented Apr 17, 2024

This would be convenient indeed!

@aidan-gibson
Copy link

Came looking for a remove orphans command, turns out choco doesn't even have this. Absolutely batty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests