from pyItunes import * from gmusicapi import Mobileclient # iTunes songs l = Library("") songs = [(song.artist, song.name) for id,song in l.songs.items()] # Google Music songs api = Mobileclient() api.login('', '') library = api.get_all_songs() # Find songs to delete delete = filter(lambda song: (song['artist'], song['title']) not in songs, library) delete = [song['id'] for song in delete] # Delete songs api.delete_songs(delete)