Remove a directory from environment path variable.
Remove entries from colon-separated variables (e.g. the system path). If the path variable is not set, nothing is done.
dirname (str) – Directory to add to the path.
path (str) – Name of the path variable to append to. Defaults to the system path ‘PATH’.