Header Banner
Null Byte Logo
Null Byte
wonderhowto.mark.png
Cyber Weapons Lab Forum Metasploit Basics Facebook Hacks Password Cracking Top Wi-Fi Adapters Wi-Fi Hacking Linux Basics Mr. Robot Hacks Hack Like a Pro Forensics Recon Social Engineering Networking Basics Antivirus Evasion Spy Tactics MitM Advice from a Hacker

How to Clear Dead Tracks from Your iTunes Library on Windows Using Only Notepad

Music library with song titles and durations highlighted.

If you've ever mistakenly moved your music files around without relinking them in iTunes, you might now be noticing that you have a long list of tracks asking you to relink them.

How to Clear Dead Tracks from Your iTunes Library on Windows Using Only Notepad

You could go through them one by one, redirect them to the new file location, then delete any copies. Or you could try to track them all down and delete the old references. But come on, who wants to spend that much time when you can clean up your library using this clever method using only Notepad on your Windows computer.

Open Up Notepad

We're going to be making a run at this problem using a script, so open up Notepad. Don't worry, the code's already written for you, you just need to copy and paste it.

Copy This Code Snippet

Copy the code over at GitHub, which looks like this:

How to Clear Dead Tracks from Your iTunes Library on Windows Using Only Notepad

Save It

Save it as something descriptive, such as "RemoveDeadTracks.js". Make sure to save it with the .js file extension, as this will tell your OS that it's a JavaScript file!

Run It

Now simply run the file by double-clicking on it. In a few minutes, it should open a dialogue box telling you how many tracks it deleted. Feel free to keep this code handy for whenever you need to clean up your iTunes library!

Troubleshooting

If it isn't working, make sure your computer didn't save the file as "RemoveDeadTracks.js.txt" by default. Make sure that the actual file extension is .js.

Now this is how you do it on a Windows computer, but does anyone know of a way to do this on a Mac?

Apple's iOS 26 and iPadOS 26 updates are packed with new features, and you can try them before almost everyone else. First, check Gadget Hacks' list of supported iPhone and iPad models, then follow the step-by-step guide to install the iOS/iPadOS 26 beta — no paid developer account required.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!