I'm trying to install a deb package offline using apt-get command. From what I understand, I can download a package manually from the internet. Put it in the local repository folder (which is usually /var/cache/apt/archives). Then update the repository using apt-get update. And finally apt-get install myPackage

I tried these steps, but I keep getting the error Unable to locate package uex_15.1.0.8_amd64. What am I missing? or should I use apt-offline? If so, how?

BTW, the package uex_15.1.0.8_amd64 is the package to install UltraEdit.

  • Your approach doesn't work. apt doesn't know the deb file is in the cache if you do it that way. Please give a specific example of what you are trying to do. And yes, I think you can use apt-offline, assuming you have apt configured correctly. Apr 21, 2016 at 8:42
  • Could you please post content of /etc/apt/sources.list file ?
    – Rahul
    Apr 21, 2016 at 8:44
  • What do you mean by a specific example? I specified everything in the question. But again the steps in more details. 1- Download the file 2- Save the file to /var/cache/apt/archives 3- run sudo apt-get update 4- run sudo apt-get install uex_15.1.0.8_amd64
    – AhmedWas
    Apr 21, 2016 at 8:46
  • 1
    Why not install with dpkg -i?
    – fkraiem
    Apr 21, 2016 at 8:48
  • 1
    @FaheemMitha Dependencies can be installed manually beforehand.
    – fkraiem
    Apr 21, 2016 at 8:51

1 Answer 1


You can do this in two separate steps:

  1. Install the package with dpkg.

    sudo dpkg -i packagename.deb
  2. That created missing dependencies. apt-get can fix missing dependencies automatically.

    sudo apt-get -f install

    That should also automatically finish configuring the original package. (So you will not likely need to run sudo dpkg --configure -a yourself.)

Why apt-get Won't Do This

apt-get checks your configured software sources (repositories) and automatically downloads and installs packages. Except in the case where a configured repository is inaccessible, this does not enable an apt-get install command to succeed that would not otherwise succeed. If the package isn't in one of your repositories, apt-get will not know to install it even if the .deb file happens to be in /var/cache/apt/archives.

You must log in to answer this question.

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