Bad rental history and eviction history stays on your record for up to 7 years.
After 7 years have passed then the rental history and any evictions are deleted from your record and will no longer show up on the record when a landlord does a background check on you.
So if it's been 7 years since you've been evicted the eviction and bad rental history will be completely deleted from public record and from your credit report as well.
After that 7 years you should have no problem getting a lease on an apartment or house as long as your credit score is good enough as in 620 and above.