You can dismantle a gun in the weaponcrafting arsenal screen by selecting a weapon in the list and clicking the Dismantle icon on the lower left of the screen:
Dismantling a gun has the following effects:
- Returns all parts used in that gun to your inventory
- Leaves the chassis behind, and any Upgrade Points you have spent on it
After a gun has been dismantled, it cen be destroyed by clicking the Destroy icon. This will clear it from the arsenal, and you will lose any spent upgrade points as well.