i removed some packages using dism from an offline image but when I try and do component cleanup it says it has pending operations, what do I do?
That's because you integrated updates (packages) and that is pending so sollution could be Syspreping your image than pending become Installed then you could do componentcleanup
Integrating updates only doesn't set the pending flag, offline enabling dotnetfx3 will. Use dism + /get-packages command to find out what's set the pending flag.