Could you describe the exact steps how to reproduce this issue? Or create a video how you can reproduce it? And which LibrePCB version are you using?
If these components are really not used anymore, you could remove them manually from the file circuit/circuit.lp in the project directory. Just search for the corresponding component names and remove the corresponding (component ... ) blocks. But make a backup first
Found the issue and fixed it so this problem should be solved with the next release:
Except that it is annoying, this bug is not critical for the integrity of a project. The workaround by manually removing these components from circuit.lp will safely clean up the stale components, so this is the way to go until the next release is available.