Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When i write sudo apt-get upgrade This message Shows Up:"dpkg: error: cannot scan updates directory `/var/lib/dpkg/updates/': No such file or directory E: Sub-process /usr/bin/dpkg returned an error code (2) " Any Help ?!

share|improve this question

This may work.

sudo dpkg --clear-avail
sudo apt-get update

It may also not. You also need to check your file system for errors, and make sure your only using repos that are for your version of Ubuntu.

I would start with the above commands, then if that still doesn't work, have a look here for restoring your apt database.

You can also try (very dangerous)

sudo mv /var/lib/dpkg/updates /root/
sudo apt-get update
sudo mkdir /var/lib/dpkg/updates
sudo chmod 755 /var/lib/dpkg/updates

Assuming your back on track you can then remove the copy of updates in /root/updates

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.