removeFromPATH method
Removes the given oldPath
from the PATH environment variable.
Changing the PATH has no affect on the parent process (shell) that launched this script.
Changing the path affects the current script and any children that it spawns.
Implementation
void removeFromPATH(String oldPath) {
final path = PATH..remove(oldPath);
_setEnv('PATH', path.join(delimiterForPATH));
}