I'm trying to update my Ubuntu 18.04 computer that does not have internet connection. However the process is failing when I try to run sudo apt upgrade. I have checked a couple of other links like: sol1, sol2 and sol3.

I have set up apt-offline on my offline computer we can call OC1, and I have also set it up on my online computer we can call OC2. I set up a signature file on my OC1, I then bring the file over to OC2, and use the command sudo apt-offline get apt-offline.sig --bundle apt-offline-update.zip. It downloads all the packages to that zip file and I then bring that file over to OC1.

Great at this point everything is normal and running as I expect it to. Now I install the package with this command: sudo ./apt-offline install /home/fletchy/Desktop/MyPC/apt-offline-update.zip I select Yes (Y) when prompted to install and it installs the packages. However it just syncs them all. However I suppose that make sense because now I would just do a normal sudo apt upgrade and I'll update and I'll be good to go. However, when I run sudo apt upgrade it runs as if its looking at the internet to install these packages not my cache or directories.

I get errors like:

Err:## http://... Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http....deb Could not resolve 'us.archive.ubuntu.com'

What I would expect to get is a successful install of the packages and update of the system. Perhaps I'm missing something small, I've used Linux for awhile now but never had to update packages offline until recently and I'm encountering this problem. I've attempted to reboot the system, and restart the entire update process from scratch.

Edit 1:

I just noticed that when I run apt-cache show I get the following response: E: No packages found

1 Answer 1


I have found a solution, there may be a better one but this worked for me...

Part 1

Instead of doing: sudo apt upgrade by itself you have to use the tag --fix-missing and it will fail at first but then discover all the packages you set up using the normal method of apt-offline and it will update as expected.

Short story use this command: sudo apt upgrade --fix-missing

Part 2

Now if your trying to install packages/products/modules so things like net-tools for example... you do everything the same except...

Dont use: sudo apt upgrade --fix-missing, use: sudo apt-get install net-tools

  • However it still seems to be failing with some update packages in Part 1... not sure why, perhaps someone could elaborate.
    – Fletchy
    Oct 10, 2019 at 13:46
  • Appreciate your question as I've been looking for an apt-offline solution for a while and for some reason no one has mentioned this. Did you ever find a solution for Part 1? I'm going to try this solution, however it still seems incredibly clunky. Just imagine people on a Mars colony trying to update their Ubuntu (or any Linux installation for that matter)! Developers always vote this type of question down because they're prejudiced: they don't think it's a problem worth addressing and I'm sick of that treatment!
    – Adam Prall
    Dec 6, 2020 at 22:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .