Remove Download
Download Endpoints
Remove Download
Removes a download task from the list and deletes all associated files
DELETE
Remove Download
Path Parameters
The unique identifier of the download task to remove
Response
Confirmation message indicating the download was removed
Example Request
cURL
JavaScript
Python
Example Response
Error Responses
404 Not Found
Returned when thedownload_id doesn’t exist.
Behavior
This endpoint performs a complete cleanup:- Removes the task from the in-memory downloads dictionary
- Deletes the video/audio file from the downloads directory (if it exists)
- Deletes the thumbnail from the thumbnails directory (checks for
.jpg,.webp, and.pngextensions) - Returns confirmation message
Files Deleted
After Removal
- The task will no longer appear in GET /api/downloads
- Attempting to access GET /api/download//file will return 404
- All disk space used by the download is freed
Cancel vs Remove
| Action | Endpoint | Effect |
|---|---|---|
| Cancel | DELETE /api/downloads/{id} | Stops the download, sets status to "cancelled", keeps task in list |
| Remove | DELETE /api/downloads/{id}/remove | Removes task from list and deletes all associated files |
Use Cases
- Free up disk space: Remove completed downloads that are no longer needed
- Clean up failed downloads: Remove tasks with status
"error" - Clear download history: Remove old downloads from the list
- Delete unwanted files: Remove downloads that were completed but no longer wanted
Error Handling
The endpoint usesmissing_ok=True when deleting files, so it won’t fail if:
- The video/audio file doesn’t exist
- The thumbnail file doesn’t exist
- Files were already manually deleted