Strip ID3v1 Tags from MP3s in Linux

For kicks I decided to remove all the ID3v1 tags from my music files today.  They were just getting in the way and served no useful purpose — since I had perfectly fine ID3v2 tags — so they just had to go.

I cooked up a little command to help out here!  But first, we need to make sure you have the command that we’re going to need here, id3v2.  Install it from the official repositories using your distribution’s package manager.  For example, on Ubuntu:

sudo apt-get install id3v2

This command is used to view and manipulate ID3 tags inside of music files.  One argument in particular is of use to us, -s, which strips ID3v1 tags out of the specified file(s).

With that in mind the task is just getting a list of the files that you want to remove ID3v1 tags from.  I’ve managed to solve that and fit it all in one line — don’t forget to replace the path with the correct one:

find /path/to/music -name \*.mp3 -type f -print0 | xargs -0 id3v2 -s

That’s it! After testing I ran it on my whole music library and it appears to have survived just fine. Just be patient (and careful) if you’re stripping tags out of hundreds or thousands of files.

Let me know how it works out for you, and any improvements you may have!

3 Responses to “Strip ID3v1 Tags from MP3s in Linux”

Got something to say? Skip to the comment form.You can keep an eye on the chatter with the comments RSS feed if you like.

  1. I think you should first use the “–convert” feature of id3v2 in some scripted way before stripping the v1 tags. I seem to have some mp3 files that only have the v1 tags and so I would lose all the info with the simple stripping.

    • That’s a good point. I knew all my music had v2 tags so I didn’t think to convert the v1 tags in the first place.

      I’ll have a look into changing my command to add the convert option — I’m hoping it’s just as simple as adding the argument, but I’ll experiment. It depends if it overwrites perfectly good v2 tags with the v1 tags…

      Thanks for the insight!

  2. find /path/to/music -name \*.mp3 -type f -exec id3v2 -s ‘{}’ \;

Leave a Reply

Have an account? Why don't you log in?

Don't have an account? Register, then you don't have to enter a pesky name, e-mail and URL everytime!

Or:

Style your comments using HTML. (e.g. <b>, <i>, <a href="URI">link text<a> etc.)