Improving choco list with options to show dependencies and sort by date (and more)
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 😄
+a more verbose one-line output, with Title and Publication date
Comment moved to separate issue: #1281
@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!
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
}
}
Try choco info
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?
I think, if an uninstallation via packages.config would be possible. I won't need this feature. See https://github.com/chocolatey/choco/issues/533
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.
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
still no way to get the dependencies of a choco package? cant see dependencies in chocoalteygui either?
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
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.
This would be convenient indeed!