Several
thousand years, at the very least, and in some quarters it's still practiced:
https://en.wikipedia.org/wiki/Slavery_in_the_21st_centuryPractices can change, and it's nice to think that once we realized it was possible for "owning people" to not be a thing, we simply made it not a thing, but in fact mindsets can be the slowest to change.
Eradication of an evil social practice is not like invention of a science or technology. We invent the car or the computer, and 25 years later it's in every country on the planet. The Father of History mentions the ills of slavery, and 2500 years later we still haven't quite got this thing licked.