Yes, by copying the config file.
Under Linux, the config file is normally located under ~/.codeblocks/somename.conf. If you have never worked with profiles, then somename will be default, otherwise it will be your profile's name.
Thus, if you have never done anything exotic, look for ~/.codeblocks/default.conf
When just upgrading Code::Blocks (not the Linux distro), normally you should not need to do anything at all.