As a frame challenge, why are you buying these products in "bulk" when you know you aren't going to be using that much? I know it's hard to estimate many projects, but if you are only using 5% of the caulk/glue/whatever, then you should be buying smaller packages, such as a 0.5-3 fl. oz. tube with a screw on cap. Most, if not all, of the products that can be bought in a caulk gun sized tube (roughly 10 fluid ounces) can be purchased in those smaller amounts. They may cost roughly the same, but if you aren't going to be using it before it goes to waste, then the cost really isn't an issue.
And no, not all products require a caulk gun. You can get similar adhesives in those smaller tubes, even if it isn't "exactly the same thing". There are plenty of silicone glues that will work in the bath, kitchen, automotive, etc. that aren't specifically labeled for them, yet work the same or better than their larger tube counterparts.
Yes, you can extend the life of a tube with the techniques listed in other answers, but, like Solar Mike said, you'll never get an indefinite life out of the tube. I've used a couple of these techniques and no, they don't work "forever". Some tubes don't even last a year. So do yourself a favor and buy smaller tubes. You'll save yourself time, money, storage space, and hassle.
You'll also save yourself the guilt of wasting 95% of the tube when you don't need it again for +5 years and the whole thing has hardened.