When I go the Music app on my iPhone it shows the 'No Content' screen (see screenshot below). This is because I purposely deleted all music from the device (through Settings > General > Usage > Music > Edit > All Music > Delete).
I also deleted all songs (about 250) from my iTunes library on my Mac (moved to trash). I can re-download them because all songs have been purchased from the iTunes store.
When I connect the device to my Mac and select the device's Music list, it shows 7 songs, with a grayed out text color, and with a circle icon with dashed outline next to each song.
The device itself does not show these songs.
When I set the device to 'Manually manage music and videos' I can delete the 'ghost' songs from the device's Music list. But after I reconnect the device the ghost songs are again visible in its Music list in iTunes...
How can I permanently get rid of these 'ghost' songs listed on my device only in iTunes?
Here's what I've tried so far:
Toggled the 'Show iTunes in the Cloud purchases' option in iTunes. On or off doesn't seem to affect the Music list for a connected device.
Turned off the 'Show All Music' option in the Music app's settings.
Reset all content and settings on the iPhone, then restoring from the device's iCloud back-up.
This did not lead to any visible change.
- Re-downloading said songs from the iTunes Store to the iTunes Library on my Mac, then synchronizing with the device.
The result was that 3 out of 7 songs were no longer grayed out, i.e. 'replaced' by their actual downloads, and playable on the device. The other 4 songs were now listed twice, one grayed out and the other the actual downloaded song, present and playable on the device.
- Deleting all 7 songs from the iTunes library (moved to trash).
I was hoping that would get rid of the 3 songs that seemed 'fixed' in step 2 above, but in fact it reverted back to the old situation, with 7 songs listed in a grayed out font.
- Downloaded the songs directly to the device using the iTunes Store app (via More > Purchased > Music).
This resulted in duplicate entries for all songs (not just the 4 songs like in step 2 above) in the device's Music list in iTunes. Synchronizing the device did not transfer the downloaded songs to the iTunes library.
Reset Sync Service on my Mac (
defaults delete com.apple.SyncServer SyncServicesResetWorldRunOnce, followed by a reboot)
iTunes Library Extras.itdb,
iTunes Library Genius.itdb, all 'Previous iTunes Libraries' and all 'Album Artwork' from
Signed out of the iTunes & App Store on the device (and signed back in).
I use iTunes 11.3.1 (2) on OS X Mavericks 10.9.4, in combination with an iPhone 5S running iOS 7.1.2. All software is up to date.
There is a cottage industry of apps to help people deal with iTunes' incoherent and inconsistent behavior. I have not tried any of those apps, and they pollute the Google results, making it hard to find an actual solution. I suspect my problem can be fixed with Apple Script, but have no idea where to start.