“If a member of your community, whether a Hebrew man or a Hebrew woman, is sold to you and works for you six years, in the seventh year you shall set that person free. When you send a male slave out from you a free person, you shall not send him out empty-handed. Provide liberally out of your flock, your threshing floor, and your wine press. Thus give to him some of the bounty with which Yahweh your God has blessed you. Remember that you were a slave in the land of Egypt. Yahweh your God redeemed you. For this reason I lay the command upon you today.”
Hebrews slaves lasted only 6 years and then were set free in the 7th year with some provisions. They were not to leave empty-handed. Yahweh freed you from your slavery in Egypt, so too you must release your Hebrew slave after 6 years.
“But if he says to you, ‘I will not go out from you,’ because he loves you and your household, since he is well off with you, then you shall take an awl and thrust it through his earlobe into the door, and he shall be your slave forever. You shall do the same to your female slave.”
There was a kind of benevolent perpetual slavery also. If you wanted to stay a slave after 7 years, you can have your earlobe pierced as a sign that you belong to this family. This goes for both male and female slaves. There was mention of slaves in Leviticus, chapter 25.
“Do not consider it a hardship when you send them out from you free persons. Because for six years they have given you services worth the wages of hired laborers. Yahweh your God will bless you in all that you do.”
You will be blessed if you release the slaves. Do not complain since you had free labor for at least 6 years.