See the instructions in Authorize or deauthorize your computer for iTunes Store purchases - Apple Support
If you no longer have access to some of the computer, use the Deauthorize All option. See the following from the above support article:
(Note that only computers are affected, not iPhones or iPads)
If you need to deauthorize a computer that you don't have access to
To deauthorize a computer that you don't have access to, you have to deauthorize all of your computers. Then authorize each computer that you have again. You can deauthorize all computers only once a year.
- Open iTunes.
- Choose Account > View My Account.
- Sign in with your Apple ID and password. Forgot your Apple ID?
- At the top of your Account Information page, go to the Apple ID Summary section.
- Next to Computer Authorizations, click Deauthorize All.
- Authorize each computer that you use again.