Delete uploaded videos using XML
You can use the <video> tag's delete action to remove a video from YouTube's website (if the video is publicly visible) and also remove the video from the My Videos page in your YouTube account. In addition, by deleting a video, you will also delete all of that video's statistics, such as the number of times the video had been viewed, as well as user comments associated with the video.
The sample feed below demonstrates how to delete a video. The sample uses the <video> tag's id attribute to identify the video to be deleted and sets the tag's action attribute value to delete.
<feed xmlns="http://www.youtube.com/schemas/cms/2.0" channel="TestChannel"> <video action="delete" id="VIDEO_ID_1_"/> </feed>
Please note the following other aspects of this feature:
Deleting a video does not have any impact on the reference file associated with that video. If you also want to remove the reference matching the video from YouTube's Content ID system, you also need to delete the reference file.
Once you have deleted a video, you will be able to successfully upload the same video to the same YouTube account. For this reason, this feature can be very useful while you are testing your feed uploading systems since you can use the same video(s) during your testing process and automatically delete the videos between tests.