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...
The command to remove an alias is
unalias
so....Manual:
NAME
SYNOPSIS
DESCRIPTION
TL;DR: The command to remove a shell alias is
unalias
. See the unalias manual. Run:But if your
gs
command is not an alias (most likely), it will not help. The response will be something like:To find the type of the command trouble you're in, use
type
built-in shell command:On my system it says it is an executable:
Compare that with a common alias
ll
:See
help type
for detailed description of thetype
shell built-in commandYou can also check if it is a symbolic link with:
On my system it isn't:
Otherwise there would be an arrow like this:
As pointed out by others, removing the alias from the current shell session is temporary. For permanent removal, you will need to find where it is defined, such as
alias gs=xyz
, and remove it there, or addunalias gs
to your~/.profile
or~/.bashrc
file.If it is not an alias, you can locate the package that installed the command and uninstall it. On Debian/Ubuntu for instance:
If
unalias
is not working, as is currently the case with fish-shell (refer to this issue #7132 from fish-shell github page for more details), you can usefunctions
with-e
(erase functions) to erase the alias.