I installed a few days ago(monday I think) elementary OS 5.0 Juno. Everything went really good, I'ma pretty experienced Linux user, I've been using ubuntu,elementary os and linux in general for quite a lot. However, today when I ran apt update this happend: https://pastebin.com/3Peg9c9M. Any ideas on how to fix this? Thanks in advance :)

  • Please execute these commands in the terminal, and let me know what if you find. sudo rm -rf /var/lib/apt/lists/* sudo apt-get update sudo apt-get clean sudo apt-get install --fix-missing – Hasan Apr 12 '19 at 9:55
  • sudo rm -rf /var/lib/apt/lists/* returns nothing sudo apt-get update the first time returned: Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ , sudo apt-get clean fixed the previous error, but returned nothing, sudo apt-get install --fix-missing returned that there are no packages to install, then I ran apt update again and the error was still there – Matt Diamond Apr 12 '19 at 9:59
  • Do you had update / upgrade / installation process ongoing when you executed the apt-update from above? – Hasan Apr 12 '19 at 10:01
  • Nope, I only had chrome running and I opened a new terminal window when I saw the reply. Already done that, same error – Matt Diamond Apr 12 '19 at 10:08
  • I have added the commands in this pastebin, Please execute the above commands and let me know. Here we are manually adding missing public keys and updating OS. Please let me know what you find. – Hasan Apr 12 '19 at 10:23

Please execute sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <yout_key_string>
For example, sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32. And run sudo apt update.

If that doesn't work or end up with error, please try to download and install keys manually from keyserver.ubuntu.com. Search your key string like this,

enter image description here

and copy every thing from the BEGIN PGP PUBLIC KEY line to END PGP PUBLIC KEY line. Save the text in a text file. Then please execute sudo apt-key add <file_name.txt>. For example if save the key contents in a text file name key, then sudo apt-key add key.txt. Now run sudo apt update from the terminal or go to and check for updates.

If this also didn't worked, please execute cp /etc/apt/trusted.gpg{~,} to restore trusted.gpg from APT automatic backup. And then run sudo apt update to check if the issue still persists. If yes, please execute sudo rm /etc/apt/trusted.gpg && apt-key update to delete and re-create it with the keys for the Ubuntu archive. Run update now.

If you face problem with , maybe there's no curated apps there, then please verify if your source list has elementary OS ppas. If your sources list don't have these,

[patches.list] ppa:elementary-os/os-patches
[elementary.list] ppa:elementary-os/stable
[appcenter.list] deb http://packages.elementary.io/appcenter bionic main

Please add them,

sudo add-apt-repository ppa:elementary-os/os-patches
sudo add-apt-repository ppa:elementary-os/stable

And add http://packages.elementary.io/appcenter bionic main at the end of the source.list file.

Please execute sudo nano /etc/apt/sources.list to open sources.list.
Hopefully this will fix your problem.

| improve this answer | |
  • I'm really sorry to bother you again, but apparently the elementary repos aren't working anymore. When I open the appcenter, or I try installing the elementary-sdk package, nothing shows up. – Matt Diamond Apr 13 '19 at 8:20
  • Let's talk on chat. – Hasan Apr 13 '19 at 8:22
  • can you get on chat pls – Matt Diamond Apr 13 '19 at 10:45
  • I have updated the answer. Glad your problem is solved. Have a nice day! – Hasan Apr 13 '19 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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