What is the most elegant way to remove a path from the $PATH variable in Bash? December 14, 2022 by Tarik My dirty hack: echo ${PATH} > t1 vi t1 export PATH=$(cat t1)