Reputation: 403
I've accumulated a lot of environment variables in my user and system Path. I'm sure some of them don't even exist anymore, so I'm going to check one by one. But is there an automatic way to do it?
Upvotes: 1
Views: 369
Reputation: 1327716
There is no native Windows function to perform such a purge.
You would need to make a script which would:
%PATH%
as described in "How can I use a .bat file to remove specific tokens from the PATH
environment variable?"setx PATH=<new string>
Upvotes: 1