Delete Missing Files from iTunes Library – Quick Guide
In this article
Yes, you can delete missing files from your iTunes library by selecting the entries that point to non‑existent media and using the “Delete from Library” command.
What You’ll Need
- iTunes (or the Music app on macOS Catalina and later) installed on your computer
- Administrator access if you plan to modify files outside the iTunes Media folder
- A backup of your iTunes library file (optional but recommended)
Step‑By‑Step
- Open iTunes. If you are on macOS Catalina or later, open the Music app – the steps are identical.
- Make sure iTunes is showing the full library view. Choose View > Show Duplicate Items to ensure you can see every track, then switch back to the normal view. This step is optional but helps expose hidden entries.
- Locate missing files. In the left‑hand sidebar, click Songs (or All Songs in the Music app). Then go to the menu File > Library > Show Duplicate Items – actually, the reliable way is to use the built‑in filter: click the small drop‑down arrow above the song list and choose File > Missing if the column is visible. If the “File” column is not displayed, right‑click any column header, select File to add it, and look for the exclamation‑mark icon indicating a missing file.
- Select all missing entries. Click any missing track, then press Ctrl+A (Windows) or Cmd+A (Mac) to highlight every entry that shows the missing‑file icon.
- Delete the selected items. Right‑click the highlighted group and choose Delete from Library. A confirmation dialog will appear; confirm that you want to remove the entries. Do **not** choose “Move to Trash” because the files are already gone – you only need to delete the database reference.
- Verify the cleanup. Return to the main song list and ensure no rows still display the missing‑file icon. If you still see any, repeat steps 3‑5 for those specific tracks.
- Save the updated library. iTunes automatically writes changes, but you can manually force a save by choosing File > Library > Export Library… and saving a fresh XML copy. This gives you a fallback point.
- Optional: Re‑organize your media folder. If you suspect other orphaned files exist, go to Edit > Preferences > Advanced (Windows) or Music > Preferences > Files (Mac) and click Reset iTunes Folder Location or Consolidate Files to move any remaining media into a clean folder structure.
Common Mistakes
Many users unintentionally delete the actual audio files instead of just the library entry. This happens when they click “Move to Trash” in the confirmation dialog. Since the files are already missing, the correct choice is “Delete from Library” only. Another frequent error is forgetting to display the “File” column, which makes it impossible to spot missing icons. Finally, some people run the cleanup while iTunes is syncing with an external device; this can cause the device to lose track of playlists. Pause any active sync before starting.
Tips
- Before you begin, make a quick backup of the library file (
iTunes Library.itlon Windows orMusic Library.musiclibraryon macOS). Copy it to a safe folder so you can restore if something goes wrong. - Use the smart playlist feature to automatically gather missing tracks: create a new smart playlist, set the rule “Location is not present,” and the playlist will populate with every missing entry. Then delete the playlist’s contents in one go.
- If you have a large library, filter by “File > Missing” and sort by artist or album to batch‑remove entire groups at once.
- After cleaning, run File > Library > Organize Library… and tick “Consolidate files” to ensure that every remaining track lives inside the iTunes Media folder. This prevents future “missing” warnings.
- On macOS Catalina and later, the Music app stores its library in
~/Music/Music. If you ever move that folder, update the location in Preferences > Files to avoid phantom missing entries.
Troubleshooting
If the missing‑file icons do not disappear after you delete the entries, try the following:
- Restart iTunes. A simple quit‑and‑reopen often refreshes the internal database view.
- Check for hidden tracks. Some songs are stored in “iTunes Media/Automatically Add to iTunes” but are not indexed. Open that folder and verify there are no stray files.
- Update iTunes. Using an outdated version can cause UI glitches where the missing status is not cleared. Install the latest version from Apple’s website.
- Run a library repair. Hold down Shift (Windows) or Option (Mac) while launching iTunes, then choose “Create Library” and point to the existing library file. This forces iTunes to rebuild its internal index.
- Manually edit the XML. As a last resort, open the exported XML file, locate entries with
<key>Location</key>pointing to non‑existent paths, delete those<dict>blocks, save, and then re‑import the XML via File > Library > Import Playlist…. Be careful – a malformed XML will prevent iTunes from loading.
If none of the above resolves the issue, consider creating a fresh library: quit iTunes, move the existing iTunes Library.itl to a backup location, then launch iTunes which will generate a new empty library. Import your media again and verify that missing entries no longer appear.
Frequently Asked Questions
Will deleting missing files remove the actual audio files from my hard drive?
No. The files are already absent; the command only removes the reference in the iTunes database.
Can I automate the removal of missing files?
Yes. Create a smart playlist with the rule “Location is not present” and then delete all songs in that playlist with a single click.
Do I need to rebuild the iTunes library after cleaning?
Usually not. iTunes updates its internal index automatically, but restarting the app ensures the changes are reflected.
What if I accidentally delete a track I still have?
Restore it from the backup you made before starting, or drag the file back into iTunes to re‑add it to the library.
Is there a way to see how many missing files I have before deleting?
Yes. Use the smart playlist method or enable the “File” column and sort by the exclamation‑mark icon; the count appears at the bottom of the window.
Does this work on Windows 10 and macOS Ventura?
The steps are the same for iTunes on Windows 10 and the Music app on macOS Ventura; only menu names may differ slightly.