16.04 software download stuck pending

13,099

Try the following methods

From the command line

Try to install with the following command

sudo apt-get install the-program-package  # general
sudo apt-get install htop                 # example (small package)
sudo apt-get install libreoffice          # example (big package)

Text after the # character are comments (not used).

If there are problems, run the following commands.

Oldfred's command list for cleaning and repairing

#houseclean
sudo apt-get autoclean # only removes files that cannot be downloaded anymore (obsolete)
sudo apt-get clean

#refresh
sudo apt-get update #resync package index
sudo apt-get upgrade #newest versions of all packages, update must be run first

#would upgrade you to the latest kernel in the repositories
#dist-upgrade is also able to remove existing packages if required
sudo apt-get dist-upgrade

# fix Broken packages -f 
sudo apt-get -f install
sudo dpkg --configure -a

# Remove lock
# If you are absolutely sure you do not have another upgrade process running.
# Locked dpkg - only if sure you are not running another update.

sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a 

added zika's tip for problems with hash sum mismatch

sudo rm /var/lib/apt/lists/*
sudo apt-get update

added 2F4U's tips for Package Manager & Update Manager problems

Does executing these commands help?

cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get update

This will rebuild the cache.

If it doesn't help, this forum thread has additional suggestions:

http://ubuntuforums.org/showthread.php?t=1869890

Synaptic Package Manager

Try to install Synaptic with the following command lines

sudo add-apt-repository universe
sudo apt-get install synaptic

and start it

  • from dash in standard Ubuntu or
  • from menu - system tools in the other Ubuntu flavours (Kubuntu, Lubuntu, ... Xubuntu).

Synaptic is a little more difficult to use compared to Ubuntu Software, but Synaptic is a very powerful and reliable tool. If you manage to install it, I think that you will be able to use it to install the program packages, that you want to install.

Other repositories

It is also possible that you need some other repository to download the program packages that you want. Please edit your question to tell us which program packages, that you are trying to install.

Share:
13,099

Related videos on Youtube

Timothy Benjamin
Author by

Timothy Benjamin

Updated on September 18, 2022

Comments

  • Timothy Benjamin
    Timothy Benjamin over 1 year

    I just got a new desktop with 16.04 installed on it, and when I try to download software from the app., it says pending for a long time, but doesn't download.

    How do I resolve this?

    Thank you

    • Samuel
      Samuel about 7 years
      But your internet connection is fine? Try running in a console: sudo apt-get update. If you get any errors, please post them here. If not, try again to install anything. Come back with your results.
    • Timothy Benjamin
      Timothy Benjamin about 7 years
      Yes. It is fine. Did the update. No errors. Still stuck in pending. Was able to download, and install software from other sources before doing this update.
    • Samuel
      Samuel about 7 years
      Try sudo dpkg --configure --pending.
    • Timothy Benjamin
      Timothy Benjamin about 7 years
      It asked for my password. After entering it, it didn't do anything. Just came back with the :~$ prompt, waiting for me to do something.
    • Samuel
      Samuel about 7 years
      Can you try to install any program from the console (asciiart, for example)? sudo apt install <package>. Lets see if we can get any error messages from it.
    • Timothy Benjamin
      Timothy Benjamin about 7 years
      I have installed Blender 2.78 and VYM-"view your mind" through the console (terminal). Also, there were some updates listed in the software center which did download and install.
    • Samuel
      Samuel about 7 years
      Can you confirm that the software didn't install? The software yo were trying to install originally.
    • Timothy Benjamin
      Timothy Benjamin about 7 years
      Yes. I'm trying now to download a program from the software center, and it just says pending. I did a search on my computer, and the program is not found.
    • Samuel
      Samuel about 7 years
      Are the packages larger than 2GB? (See bug report: bugs.launchpad.net/ubuntu/+source/software-center/+bug/90988‌​5)
    • Timothy Benjamin
      Timothy Benjamin about 7 years
      No. I've been trying smaller ones like notes.
    • Samuel
      Samuel about 7 years
      Hmmm... I'm out of ideas, so my suggestion is to use ubuntu-software or synaptic, instead of software-center. You may have better luck reporting a bug at the project's launchpad: bugs.launchpad.net/ubuntu/+source/software-center :(
    • Timothy Benjamin
      Timothy Benjamin about 7 years
      Thank you for your help. I'm learning that there are other ways to procure software, which is what I wanted in the first place.
  • Timothy Benjamin
    Timothy Benjamin about 7 years
    I have installed 2 packages from the command line: blender and VYM. I'll try to install the synaptic package manager if I give up on trying to resolve the situation with the ubuntu software center. At present, there are no other programs I need to install.