Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) (in Jammy)

Asked by MadhuSoodanan

cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Instead of sudo apt-get update I used the apt-get update command

apt-get update
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)

How can I check whether I fix this problem?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
MadhuSoodanan (mt-madhu) said :
#1
Revision history for this message
Best Manfred Hampl (m-hampl) said :
#2

"apt-get update" will always end with error 13 permission denied. You have to activate administrative authorizations, e.g. with sudo

Revision history for this message
MadhuSoodanan (mt-madhu) said :
#3

Thanks Manfred Hampl, that solved my question.

Revision history for this message
MadhuSoodanan (mt-madhu) said :
#4

Sorry for my late reply.