Here's how I do it.
If from a tube to another, squeeze into tube from open bottom. If making your own paint apply product to open end with palette knife. Empty tube should have cap on.
When tube is about one third, to one half 'full', grasp tube, cap side down, like a small captured bird. Firmly, but not so hard as to crush. The cap should not protrude from fist. Then lightly bang down fist on a firm cushioned surface like the back of a chair or a small towel balled up on a sturdy table. The paint will quickly sink down. Apply more paint into open end and repeat as required.
When the tube it filled to your desire, close and firmly fold open end AT LEAST three times. Try and make this even. If you've been filling with a palette knife and not another tube there will be some mess. Don't worry about this. recover this paint into a small pile.
There will still be air pockets. Remove cap. Grasp tube again as before, but cap side up. Bottom of tube should be well within fist so as not to crush when again bang down tube on firm surface. If you can squeeze the tube just so when doing this, it won't bulge out to bottom, but it doesn't matter much if it does. Though it will be harder to tell when the air pockets have all gone I suppose.
When the paint drops at the cap end, you can, if you filled with palette knife, refill at the nozzle from the little pile of paint as though this is a super mini tube of paint.
When the paint level ceases to drop any further (without expanding the base of the tube) you know all air pockets are removed. Squeeze paint tube so paint is level to cap opening. Naturally the tube base might need to be folded up more after compacting contents.
I wouldn't recommend this method if tubing up paint everyday. As it would be a bit hard on the wrist, but this is basically how it's been done for about a century.