Yes, garbage collection will clean up any pieces that shouldn’t be there. It works using bloom filters. That’s a sort of compressed piece of data that with clever code will check pieces if they match. All pieces you should have will match the bloom filter. All the pieces that don’t match will get cleaned up. Though about 10% of pieces your node shouldn’t have will also match that bloom filter. So it will take more than one run to clean up everything.