Step 1. Confirm your recycle board ID (verify visually before proceeding)
USE smf209;
SELECT id_board, name
FROM smf209_boards
WHERE name LIKE '%Recycle%';
-- Confirm the id_board returned above matches "Recycle Bin" before continuing.
-- The rest of this script assumes that ID is 88 - change it below if different.
START TRANSACTION;
SET @recycle_board = 88;
Step 2. Delete attachment records (all types, not just regular attachments)
DELETE a
FROM smf209_attachments AS a
JOIN smf209_messages AS m
ON a.id_msg = m.id_msg
WHERE m.id_board = @recycle_board;
Note: this removes the database records only - physical files remain on disk in your attachments directory until cleaned up separately (Step 6).
Step 3. Delete the topics (board-scoped, before messages so id_topic is still resolvable)
DELETE t
FROM smf209_topics AS t
WHERE t.id_board = @recycle_board;
Step 4. Delete the messages
DELETE
FROM smf209_messages
WHERE id_board = @recycle_board;
Step 5. Update board statistics
UPDATE smf209_boards
SET
num_topics = 0,
num_posts = 0,
id_last_msg = 0
WHERE id_board = @recycle_board;
COMMIT;
Step 6. Go to Admin → Forum Maintenance → Attachment Maintenance to clean up the now-orphaned physical files on disk.