Skip to main content
1 of 5
Caleb
  • 72k
  • 19
  • 203
  • 234

I've seen people clean up duplicates from their PATH variable using awk and something like this:

PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++') 

You could try adding that to your own bashrc and make sure you source the other files somewhere before running that.

And alternative would be to use this pathmearge utility.

Caleb
  • 72k
  • 19
  • 203
  • 234