"Bad Worm!" is a Season 15 episode of the spin-off, "Sponged Together". It was written by William Leonard.
SpongeBob misses Gary so much that he goes to a pet store and buys a worm, which he calls Rexy. However, Rexy trashes the house, but SpongeBob doesn't even seem to notice. The other housemates plan to get rid of him, so they make up a plan to fool SpongeBob. First, they wreck SpongeBob's bedroom when he isn't here, then, when SpongeBob is back, they blame it on Rexy. SpongeBob sees the state of his bedroom and tells Rexy to leave the house forever. Rexy is sad when he leaves the Sponged Together house, but when he reaches SpongeBob's Pineapple he makes friends with Gary. THE END.