When was the phrase “rub out” first used to mean “kill”?

The phrase “rub out” first appeared not among gangsters in the Roaring ’20s but among the rugged fur traders and trappers of the Great Plains and Rocky Mountains in the early 19th century.

It came into more widespread use in World War I.