Ubuntu – How to remove an alias

aliascommand line

I want to remove gs alias from my PC. When I type gs it will open GhostScript. But I checked everywhere in the home directory .alias .bash_aliases .bashrc

I also overwrite the gs with my custom alias.

I can't remove it. And I also type alias in terminal, in the list I couldn't find it.

Please I want to remove it…

Best Answer

The command to remove an alias is unalias so....

 unalias gs

Manual:

NAME

unalias - remove alias definitions

SYNOPSIS

unalias alias-name...

unalias -a

DESCRIPTION

The unalias utility shall remove the definition for each alias name specified. See Alias Substitution . The aliases shall be removed from the current shell execution environment; see Shell Execution Environment .

-a Removes All aliases