microsoft/PowerToys

Remove duplicates from PATH environment variables

Open

#40,402 opened on Jul 4, 2025

View on GitHub
 (8 comments) (0 reactions) (0 assignees)C# (133,154 stars) (7,978 forks)batch import
Help WantedIdea-EnhancementProduct-Environment Variables

Description

Description of the new feature / enhancement

When using the Environment Variables PowerToy recently it made editing the path an absolute breeze. However I noticed that a utility that I use, adds itself to the PATH environment variable every time it updates. I found myself looking for a "remove duplicates" option, but it was missing.

When using "Edit Variable" on a PATH, there is a little "..." menu item, which pops up some options, "Move Up, Move Down, Delete, Insert Before, Insert After", adding "Remove Duplicate" to this list would be very handy.

Scenario when this would be used?

When working with a PATH, and using "Edit Variable". It would keep the first occurring instance the then remove all subsequent, identical paths. Doing this manually is error prone and something that the utility could easily do for me.

Supporting information

No response

Contributor guide