'Interaction of variables-Significance in a GLM

Assume that we have the following glm model:

X ~ A + B + A:B

And assume that neither A nor B are significant but their interaction is. Should I keep only that variable and update my model to

X ~ A:B

Or keep the model the way it is (X~A+B+A:B)? Also what happens when in the same model we have variable A and Interaction being significant but B is not? The correct model to consider is A+A:B or the full one, A+B+A:B??

Thank you for your time in advance!!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source