Silencing bash's unalias when there's nothing to unalias

Solution 1:

Just redirect the output.

unalias rm mv cp >/dev/null 2>/dev/null

Solution 2:

In bash you could do the following to unalias an alias only if it exists, for example rm:

[ -n "`alias -p | grep '^alias rm='`" ] && unalias rm

Another idea would be to overwrite the alias, even it if exists:

alias rm='/bin/rm'