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

This question already has an answer here:

I tried apt-get update and upgrade together and this is what I got.

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

What should I do?

share|improve this question

marked as duplicate by Avinash Raj, falconer, Florian Diesch, Lucio, Eric Carvalho Feb 2 '14 at 0:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Whoopsie, didn't see that question was there already – Chinmaya K R Feb 1 '14 at 11:23

Have you tried using sudo?

Updating applications requires you to use administrative powers, which for security reasons are locked behind sudo.

Try using:

sudo apt-get update


sudo apt-get upgrade

and enter your password to upgrade your programs.

share|improve this answer

To run both apt-get update and apt-get upgrade you need superuser privilege. You can run these together as,

sudo apt-get update && sudo apt-get upgrade 

And obviously you need to give your administrative password.

share|improve this answer

The command apt-get update and apt-get upgrade requires you to be a root.

You have to do this way:

sudo apt-get update
sudo apt-get upgrade

Then you are prompted to enter your password. Enter it and enjoy :)

share|improve this answer

You want to superuser privilege to run these... Then, you should be superuser.. To be Superuser.. you should add "Sudo" to these commands.

Try this...

sudo apt-get update

sudo apt-get upgrade

And if it is asking a password, Then, Give your Password And Hit the Enter button..

share|improve this answer

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