How to delete iTunes once and for all from the command-line?

I'd like to delete iTunes and never ever have it make it again in my OS X system.

On a fresh install of OS X 10.6.8 I had iTunes 10 and noticed that on the first "Software update" OS X wants to install iTunes 11. I unchecked the box next to iTunes 11 and then I uninstalled iTunes manually:

rm -rf Applications/iTunes.app

The system rebooted fine and OS X seems to work fine.

However while opening Software Updates I noticed that iTunes 11 was checked again. So if I didn't uncheck it again I take it it would have installed itself again.

Is there a way to delete iTunes and tell OS X / Apple to never ever install iTunes again and never check for iTunes updates? Or are the updates suggestions made from Apple's side, no matter what you have (or have not) installed on your own OS X?

P.S: I'm using OS X on a Mac in my living room only to listen to my local music collection (never ever streaming from the net) using Cog and to watch movies and that's it.


Solution 1:

I haven't tested this yet, but softwareupdate seems to support adding ignored updates:

softwareupdate --ignore iTunes

--ignore ...
            Manages the per-machine list of ignored updates.

--reset-ignored
            Clears the list of all ignored updates.

[...]

sudo softwareupdate --ignore iCal iPhoto

      Ignored updates:
      (iPod, SafariUpdate)

This might prevent iTunes from getting reinstalled when you upgrade OS X:

sudo rm -r /Applications/iTunes.app
touch /Applications/iTunes.app
chflags hidden /Applications/iTunes.app

Solution 2:

OS X is checking for updates because of the receipt file, not because of the application. I'm pretty sure there's no easy way to delete the receipt for an app that's part of the OS. Back in the day, each app had its own receipt, but now I think they're stored in a database. If you look in /Library/Receipts, you'll see just non-OS apps.

Why does it bother you that iTunes is on your Mac? It's not getting in the way of anything.