Support Forum: Get Support for Patch My PC Products and Services

Commercial Products: Support for Our Enterprise Product for Microsoft ConfigMgr and Intune => Commercial/Paid Products: Support and General Questions (ConfigMgr and Intune) => Topic started by: KLUSA on November 14, 2025, 10:43:02 AM

Title: "R for Windows" update leaves behind old version
Post by: KLUSA on November 14, 2025, 10:43:02 AM
"Windows for R" was recently updated to version 4.5.2, but it left behind version 4.5.1. So now there are two versions of R installed.

Is it possible to make future updates remove older updates?
Title: Re: "R for Windows" update leaves behind old version
Post by: Michael (Patch My PC) on November 14, 2025, 12:51:34 PM
I'll double check, but I'm pretty sure this is expected behavior by the vendor. Kinda like Python where you may want multiple versions to run specific items.

If you do want to remove pervious versions, you can add our 'Uninstall-Software.ps1' script as a Pre-Script to remove them: https://github.com/PatchMyPCTeam/Community-Scripts/tree/main/Uninstall/Pre-Uninstall/Uninstall-Software
Title: Re: "R for Windows" update leaves behind old version
Post by: Michael (Patch My PC) on November 14, 2025, 01:20:15 PM
Yeah, that seems to be the default behavior for the installer.

if you use that pre-script I mentioned, you can do something like the below for the parameters:

-DisplayName \"R for Windows*\" -VersionLessThan \"%Version%\" -UninstallAll

This will search for all 'R for windows*' installs. And the Version will dynamically change to the current version of the latest update and remove any LessThan.