This article explains how to deauthorize iTunes on a computer that you plan to get rid of or have already gotten rid of, so that no one else can access music, videos, and other content purchased from the iTunes Store. These instructions apply to iTunes 12 and later, but should work for earlier versions as well.
Open iTunes on the computer you want to deauthorize.
Go to Account > Authorizations > Deauthorize this computer.
If prompted, sign in with your Apple ID and click Deauthorize.