Note for advanced users that there are alternatives in the form of scripts. However it is good to explore because it allows to see what really happens.
flag lets you download from more than one Ubuntu repository at a time. Apt will enable the the new repository on your system.
When you start using Apt or install packages, your computer will pull them from the new local source.
This method isn’t hard to set up, and works as easily as a regular online upgrade does. You will need an Internet-connected Ubuntu computer to set everything up and feed packages to the offline one.
Next, you’re going to need another copy of the package for the offline box. Put the package on a USB drive to install on the offline box.
Offline upgrades aren’t super common in today’s world with most devices being connected to the Internet.