How to Reset iTunes Library: Full Guide
In this article
Resetting your iTunes library clears the database that tracks your music, playlists, and preferences, giving you a fresh start. This is useful if the library is corrupted, you want to remove all synced data, or you’re preparing to sell or give away your computer. Before you begin, back up any files you want to keep—resetting does not delete your actual music files, but it will remove all playlists, ratings, and play counts.
What You'll Need
- Your computer (Windows or Mac)
- iTunes installed (or the Music app on macOS Catalina or later)
- Administrator access to your user account
- An external drive or cloud storage if you plan to back up your library file
Step-by-Step
Important: The exact menu names may differ slightly depending on your iTunes version and operating system. The steps below work for the latest versions of iTunes on Windows and macOS Mojave or earlier. For macOS Catalina and later, use the Music app instead.
On Windows (iTunes)
- Close iTunes completely. Make sure it’s not running in the background—check the system tray (bottom-right corner) for the iTunes icon and right-click it, then choose “Quit” if present.
- Press Windows + R to open the Run dialog box.
- Type
%USERPROFILE%\Music\iTunesand press Enter. This opens the iTunes folder in File Explorer. - Locate the file named
iTunes Library.itl(oriTunes Libraryif file extensions are hidden). This is your library database. - Rename the file to something like
iTunes Library (backup).itl. Do not delete it yet—this is your backup in case something goes wrong. - Open iTunes again. It will detect that the library file is missing and create a new, empty library. Your media files (songs, videos) remain in your iTunes Media folder and will appear once you re-add them.
On Mac (macOS Mojave or earlier)
- Quit iTunes. Press Cmd + Q or choose Quit from the iTunes menu.
- Open Finder. In the menu bar, click “Go” and then “Home” (or press Cmd + Shift + H).
- Navigate to
~/Music/iTunes(the tilde represents your home folder). - Find the file
iTunes Library.itl. - Rename it to
iTunes Library (backup).itl. - Reopen iTunes. It will create a fresh library.
On macOS Catalina or later (Music app)
- Quit the Music app. Press Cmd + Q.
- In Finder, go to
~/Music/Music(not the iTunes folder). - Rename the file
Music Library.musiclibrarytoMusic Library (backup).musiclibrary. - Reopen the Music app. It will build a new library.
Common Mistakes
- Deleting the library file instead of renaming it. If you delete it, you lose your playlists and ratings permanently. Renaming preserves them as a backup.
- Forgetting to close iTunes first. If iTunes is running, it may rewrite the library file when you rename it, causing the reset to fail or corrupt the new file.
- Resetting the wrong folder. On Windows, the default location is
%USERPROFILE%\Music\iTunes. If you changed your media folder location, your library file might be elsewhere. Check iTunes Preferences > Advanced to see the current location. - Assuming your music files are deleted. Resetting the library does not delete your actual audio files. They remain in your iTunes Media folder. You just need to re-add them to the new library.
Tips
- Back up your library file before resetting. Copy the
iTunes Library.itlfile to an external drive or cloud storage. This way you can restore it if you change your mind. - Use “Add to Library” to re-import your media. After the reset, go to File > Add to Library (or Music > File > Add to Library) and select your iTunes Media folder to bring back all your songs and videos.
- Consider exporting your playlists first. You can export a playlist as an .m3u file (File > Library > Export Playlist) and re-import it later, though you’ll lose ratings and play counts.
- If you use iCloud Music Library or Apple Music, your library may re-sync from the cloud after you sign in, which could override the reset. To avoid that, sign out of Apple Music before resetting and sign back in only if you want your cloud library back.
Troubleshooting
If iTunes does not create a new library after renaming:
- Make sure you renamed the correct file. On Windows, the file is
iTunes Library.itl. On Mac, it’s the same name. In the Music app on Catalina+, it’sMusic Library.musiclibrary. - Check that iTunes is fully closed. Open Task Manager (Windows) or Activity Monitor (Mac) and look for any iTunes or Music processes. End them if necessary.
- If iTunes still doesn’t create a new library, press and hold the Shift key (Windows) or Option key (Mac) while launching iTunes. A dialog will appear asking you to “Choose Library.” Click “Create Library” to start a fresh one.
If your media files are missing after the reset:
- Your files are still on your computer. Go to File > Add to Library and select the folder where your music is stored (usually
iTunes Mediainside the iTunes folder). - If you don’t know where your media is, check iTunes Preferences > Advanced to see the “iTunes Media folder location.”
If you see an error like “The iTunes Library file is locked” or “cannot be modified”:
- Right-click the library file, choose Properties (Windows) or Get Info (Mac), and make sure it is not marked as “Read-only.”
- On Windows, you may need to take ownership of the file if it was created by another user account.
If you want to undo the reset:
- Close iTunes, delete the newly created library file (or move it aside), and rename your backup file back to its original name. Then reopen iTunes.
Frequently Asked Questions
Will resetting iTunes delete my music files?
No. Resetting the library only clears the database that tracks your files. Your actual audio files remain on your hard drive. You’ll need to re-add them to the new library.
Can I reset iTunes without losing my playlists?
Yes, if you rename the library file instead of deleting it, you can restore it later by renaming it back. However, the new library will be empty until you re-import your media.
Does resetting iTunes affect my iPhone or iPad sync?
It may. When you connect your device, iTunes will treat it as a new library and may ask you to sync or erase existing content. To avoid data loss, back up your device before resetting.
What is the difference between resetting and reinstalling iTunes?
Resetting only clears the library file, not the application itself. Reinstalling removes and reinstalls the program, which may also reset preferences but not your library file unless you delete it manually.
Can I reset iTunes on my phone?
iTunes is not available on iOS. On iPhone or iPad, you use the Music app. To reset your music library on iOS, you can go to Settings > Music and toggle off “Sync Library” (if you use Apple Music), but that doesn’t delete your downloaded files. There is no direct “reset library” option on iOS.
Will resetting iTunes fix corrupted playlists?
Yes, a corrupt library file often causes playlists to disappear or crash. Resetting creates a fresh database, which usually resolves those issues. You’ll lose the corrupted playlists, but you can rebuild them.