What is the difference between Clear and Remove?

I assume that there is difference between the commands Clear and Remove. But it seems to me that I am not aware of any caveats against their misuse. For instance,

a = 5; a =.; ?a. (* or *) a = 5; Clear[a]; ?a.*
a = 5; Remove[a]; ?a.


The effects are the same and so is the error message:

Information::nomatch: "No symbol matching a. found."

Another curiosity is about the warning difference if a dot is omitted after a,

a = 5; Remove[a]; ?a


• may be this could help Difference between Clear and Remove in Mathematica Commented May 24 at 9:46
• Also help says Clear and ClearAll leave the cleared symbol intact. Use Remove to remove the symbol completely: see reference.wolfram.com/language/workflow/… Basically clear removes any values attached to the symbol, but leaves the symbol in the context. While Remove, removes the symbol altogether. Commented May 24 at 9:51

To see the the difference, try:

a = 1;
f[i_] := a + i
f[1]


2

Clear[a]
f[1]
NameQ["a"]


1 + a

True

Remove[a]
f[1]
NameQ["a"]


1 + Removed["a"]

False

As you can see, Remove has a different effect on other definitions that a is inside of. After Removing, a is not allowed to be used anymore because it doesn't exist anymore, even symbolically. You have to recreate a and any function depending on it, because even if you recreate a, f will still be in a broken state:

a = 1;
f[1]


1 + Removed["a"]

Remove is often overkill, but it's sometimes necessary if you need strict control over which symbols exist and which ones don't. And as Goofy remarks in a comment: Remove also deletes the symbol from the auto completion functionality in the FrontEnd, which can be useful to be aware of.

In short summary:

• Clear deletes most "normal" definitions associated with a symbol, but not Options and Attributes etc.
• ClearAll deletes everything associated with a symbol, including Options and Attributes (and some other stuff). In normal everyday use of WL, you'll hardly ever need a bigger cannon than ClearAll.
• Remove deletes the entire existence of a symbol itself.
• Another difference: If I remove a symbol, it doesn't show up in autocompletion. I do this after I mistype a built-in command, since the default autocompletion settings seem to favor my mistakes. Commented May 24 at 15:34