Relevant area(s)
WinGet CLI
Relevant command(s)
winget uninstall
Brief description of your issue
When two portable packages provide binaries with identical filenames (e.g. ffmpeg.exe, ffplay.exe, ffprobe.exe) and one of them is installed with ArchiveBinariesDependOnPath: true (so it does not create symlinks in …\WinGet\Links), winget incorrectly associates the symlinks created by the other package with the one being uninstalled. This causes a false "package has been modified" warning, and using --force deletes symlinks that belong to a completely different, still-installed package.
In my concrete case:
Gyan.FFmpeg is installed and creates symlinks ffmpeg.exe, ffplay.exe, ffprobe.exe in C:\Users\<User>\AppData\Local\Microsoft\WinGet\Links.
yt-dlp.FFmpeg is then installed. Because its manifest sets ArchiveBinariesDependOnPath: true, it correctly does not create any symlinks.
- When uninstalling
yt-dlp.FFmpeg, winget nevertheless inspects the existing symlinks in …\WinGet\Links, sees they don't point into the yt-dlp.FFmpeg install directory, reports the package as modified, and (with --force) deletes the symlinks – which actually belong to Gyan.FFmpeg.
Steps to reproduce
- Make sure the
…\WinGet\Links folder contains no ffmpeg.exe, ffplay.exe, or ffprobe.exe.
- Install Gyan.FFmpeg (use admin shell):
winget install --id Gyan.FFmpeg
Confirm that ffmpeg.exe, ffplay.exe, ffprobe.exe symlinks appear in C:\Users\<User>\AppData\Local\Microsoft\WinGet\Links and point into the Gyan.FFmpeg package directory.
- Install yt-dlp.FFmpeg (which uses
ArchiveBinariesDependOnPath: true):
winget install --id yt-dlp.FFmpeg
Confirm that no new symlinks are created (as expected for this manifest).
- Uninstall yt-dlp.FFmpeg:
winget uninstall --id yt-dlp.FFmpeg
- Observe the "package has been modified" warning. Re-run with
--force:
winget uninstall --id yt-dlp.FFmpeg --force
- Check
C:\Users\<User>\AppData\Local\Microsoft\WinGet\Links and observe that the Gyan.FFmpeg symlinks have been deleted, even though Gyan.FFmpeg is still installed.
Relevant log excerpt:
[CLI ] Found one app. App id: yt-dlp.FFmpeg App name: FFmpeg for yt-dlp
[CLI ] Symlink target does not match ARP Entry.
Expected: C:\Users\<User>\AppData\Local\Microsoft\WinGet\Packages\yt-dlp.FFmpeg__DefaultSource\ffmpeg-N-124279-g0f6ba39122-win64-gpl\bin\ffmpeg.exe
Actual: C:\Users\<User>\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-8.1.1-full_build\bin\ffmpeg.exe
[CLI ] Portable file has been modified: C:\Users\<User>\AppData\Local\Microsoft\WinGet\Links\ffmpeg.exe
[CLI ] Deleting portable symlink at: C:\Users\<User>\AppData\Local\Microsoft\WinGet\Links\ffmpeg.exe
[CLI ] Deleting portable symlink at: C:\Users\<User>\AppData\Local\Microsoft\WinGet\Links\ffplay.exe
[CLI ] Deleting portable symlink at: C:\Users\<User>\AppData\Local\Microsoft\WinGet\Links\ffprobe.exe
Expected behavior
- A package installed with
ArchiveBinariesDependOnPath: true should not be tracked against any symlinks in …\WinGet\Links, since it never created any.
- Uninstalling such a package must never inspect, claim ownership of, or delete symlinks belonging to a different installed package.
winget uninstall --id yt-dlp.FFmpeg should remove only files/registry entries owned by yt-dlp.FFmpeg (the extracted archive directory and its portable ARP entry), without producing a "package has been modified" warning and without touching symlinks created by Gyan.FFmpeg.
Actual behavior
- Winget matches symlinks in
…\WinGet\Links to the package being uninstalled purely by filename, even though that package never created the symlinks (ArchiveBinariesDependOnPath: true).
- Because the symlink targets don't point into the
yt-dlp.FFmpeg install directory, winget reports Symlink target does not match ARP Entry / Portable file has been modified and refuses to uninstall without --force.
- When
--force is used, winget deletes the ffmpeg.exe, ffplay.exe, and ffprobe.exe symlinks that actually belong to Gyan.FFmpeg, leaving Gyan.FFmpeg installed but with its PATH-exposed entry points silently broken.
Environment
Windows-Paket-Manager v1.28.240
Windows: Windows.Desktop v10.0.26200.8246
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.28.240.0
Relevant area(s)
WinGet CLI
Relevant command(s)
winget uninstall
Brief description of your issue
When two portable packages provide binaries with identical filenames (e.g.
ffmpeg.exe,ffplay.exe,ffprobe.exe) and one of them is installed withArchiveBinariesDependOnPath: true(so it does not create symlinks in…\WinGet\Links), winget incorrectly associates the symlinks created by the other package with the one being uninstalled. This causes a false "package has been modified" warning, and using--forcedeletes symlinks that belong to a completely different, still-installed package.In my concrete case:
Gyan.FFmpegis installed and creates symlinksffmpeg.exe,ffplay.exe,ffprobe.exeinC:\Users\<User>\AppData\Local\Microsoft\WinGet\Links.yt-dlp.FFmpegis then installed. Because its manifest setsArchiveBinariesDependOnPath: true, it correctly does not create any symlinks.yt-dlp.FFmpeg, winget nevertheless inspects the existing symlinks in…\WinGet\Links, sees they don't point into theyt-dlp.FFmpeginstall directory, reports the package as modified, and (with--force) deletes the symlinks – which actually belong toGyan.FFmpeg.Steps to reproduce
…\WinGet\Linksfolder contains noffmpeg.exe,ffplay.exe, orffprobe.exe.ffmpeg.exe,ffplay.exe,ffprobe.exesymlinks appear inC:\Users\<User>\AppData\Local\Microsoft\WinGet\Linksand point into theGyan.FFmpegpackage directory.ArchiveBinariesDependOnPath: true):--force:C:\Users\<User>\AppData\Local\Microsoft\WinGet\Linksand observe that theGyan.FFmpegsymlinks have been deleted, even thoughGyan.FFmpegis still installed.Relevant log excerpt:
Expected behavior
ArchiveBinariesDependOnPath: trueshould not be tracked against any symlinks in…\WinGet\Links, since it never created any.winget uninstall --id yt-dlp.FFmpegshould remove only files/registry entries owned byyt-dlp.FFmpeg(the extracted archive directory and its portable ARP entry), without producing a "package has been modified" warning and without touching symlinks created byGyan.FFmpeg.Actual behavior
…\WinGet\Linksto the package being uninstalled purely by filename, even though that package never created the symlinks (ArchiveBinariesDependOnPath: true).yt-dlp.FFmpeginstall directory, winget reportsSymlink target does not match ARP Entry/Portable file has been modifiedand refuses to uninstall without--force.--forceis used, winget deletes theffmpeg.exe,ffplay.exe, andffprobe.exesymlinks that actually belong toGyan.FFmpeg, leavingGyan.FFmpeginstalled but with itsPATH-exposed entry points silently broken.Environment