Delete your YouTube Music library and/or uploads
Project description
ytmusic-deleter
A command-line interface for performing batch delete operations on your YouTube Music library. You can use this to remove items from both your library and from your uploads.
Setup
- Install Python. Make sure it is available on your PATH.
- Open a command prompt and type
pip install ytmusic-deleter
. Use a virtual environment if you're familiar with the process. - Run ytmusic-deleter by simply entering
ytmusic-deleter
at the command line. - The first time you run ytmusic-deleter, you will be asked to paste your request headers from Firefox. This allows ytmusic-deleter to make requests against your music library. To copy your request headers follow the instructions from the ytmusicapi docs under "Copy authentication headers".
- Press
Enter
after pasting the headers, then press Ctrl-D to continue (Ctrl-Z then Enter again on Windows). The next time you run ytmusic-deleter, it will reuse your headers from theheaders_auth.json
file that it generated.
Usage
Type ytmusic-deleter
to see the usage information. There are currently four commands available:
delete-uploads
: Delete all tracks that you have uploaded to your YT Music library.
Use the
--add-to-library
or-a
option to add each album or song to your library from YouTube Music's online catalog before deleting it from your uploads. If a match could not be found, the album or song will remain in your uploads. Note that each track that gets added to your library this way will have a thumbs up "Like" in your library due to how the ytmusicapi works.
remove-library
: Remove all tracks that you have added to your library from within YouTube Music.
unlike-all
: Reset all Thumbs Up ratings back to neutral.
delete-all
: Combo command that will run delete-uploads
, remove-library
, and unlike-all
.
Examples
Getting help:
ytmusic-deleter --help
This will print the usage information for ytmusic-deleter
and exit.
You can use the --help
argument to print usage information for subcommands as well, as follows:
ytmusic-deleter delete-uploads --help
Delete all your uploads:
ytmusic-deleter delete-uploads
Delete all your uploads but add them to your YouTube Music library first:
ytmusic-deleter delete-uploads -a
Remove all your library tracks (not uploads):
ytmusic-deleter remove-library
Reset all Thumbs Up ratings back to neutral:
ytmusic-deleter unlike-all
Remove everything (uploads, library tracks, and unlike all songs):
ytmusic-deleter delete-all
Troubleshooting
ytmusic-deleter: command not found
or
'ytmusic-deleter' is not recognized as an internal or external command,
operable program or batch file.
Make sure you ran pip install ytmusic-deleter
to install ytmusic-deleter. If you're still getting this error, try closing and re-opening your command prompt.
Failed loading provided credentials. Make sure to provide a string or a file path. Reason: Expecting value: line 1 column 1 (char 0)
You will see this printed by the ytmusicapi the first time you run. This means that your existing request headers file (headers_auth.json) could not be found. The next few lines will prompt you to paste your request headers so this file can be generated.
Other various exceptions may occur while running ytmusic-deleter because there is a wide swath of possible metadata on your library, and the YouTube Music backend is changing rapidly. Most errors deleting albums have been accounted for and you may just have to delete a couple albums manually that got left behind. If there are any errors that halt the entire program in the middle of deletion, please create an Issue and post the full error.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ytmusic-deleter-1.1.0.tar.gz
.
File metadata
- Download URL: ytmusic-deleter-1.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 078326724db32462d36384da5bc7ea7b2a96385768fab8616e706cffe08795c2 |
|
MD5 | 6954d9c6a5f172134a2df93d7fc3d39d |
|
BLAKE2b-256 | 04d445015dfea4f49a6814ef3241363f274a5551a22af26f0235c0f78132743b |
File details
Details for the file ytmusic_deleter-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: ytmusic_deleter-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bec9b5c33b437af820fe7c6276778a3f3407937822a3e74136530d23cc2dcb6 |
|
MD5 | 059f3b34e8bcedd406822f1daa02949e |
|
BLAKE2b-256 | 0de097daf920802bb978ec628a6b6432745fddea398b1ec7a6026de23cb70ed8 |