-1

I have typed the following command:

$ apt update && apt upgrade

I am getting the error:

Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

Somebody please guide me.

Zulfi.

user2994783
  • 225
  • 3
  • 6
  • 16

1 Answers1

1

As a normal user you don't have privileges to run these commands successfully, you need root privileges. To do that, you need to prepend the sudo-command to your commands:

$ sudo apt update && sudo apt upgrade

You will be prompted to enter your password then.

mook765
  • 15,925