Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.