Nuspec - Remove packages prior to installing (Replaces) / Do not install if need is already met (Virtual)
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
Hi Choco-Experts,
I'm wondering if there's a way to leverage the dependencies feature in the nuspec file to ensure that a program or type of program IS NOT INSTALLED prior to installing my program.
USE CASE 1:
I want to install an Anti-Virus program only if no other anti-virus programs are found installed on the computer. I also want to ignore the built-in windows malware tools (Defender, MSE). If I find something like Symantec or Carbon Black installed before I install Cylance, I want it to be removed prior to installation. Uptime states might come into play (if pending reboot or uptime too long, make no changes).
USE CASE 2:
Remove old MSPs RMM agent before installing the new one. Here there may be a conflict or there may not be, so there could be an option switch that tells the dependencies removal is required prior to installation, **versus** the case where the new app should be installed and confirmed working, prior to the old app being uninstalled.
I'm also assuming one will need to build the installer and _uninstaller_ packages for each program you want to remove (or grab them from the community, and internalize them).
This would be a good MSP feature if it had the ability to auto-sync device packages, check for "anti-dependencies" and execute choco uninstallers for them. I could call WMI on the machine to make sure no AV exists and fail out if it is. But before that my known uninstallers specified in the nuspec would run if those apps are found. At MSPs we do take-overs all the time.
Contributor guide
Research direction
Review Chocolatey's nuspec dependency handling and existing Chocolatey uninstallers; no source files or tests are named, so first locate those entry points. Done criteria would need an agreed syntax and ordering for required removals versus virtual or conflicting packages, validated against the antivirus and RMM cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100