0

My system is broken not able to work anything on that. Ubuntu online store shows empty enter image description here when I try to update I get an error related to Appstream

AppStream system cache was updated, but problems were found: Metadata files have errors: /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-security_universe_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-security_main_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-backports_universe_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-updates_universe_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-updates_main_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic_multiverse_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic_universe_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic_main_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/packages.elementary.io_appcenter_dists_bionic_main_dep11_Components-amd64.yml.gz Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi' E: Sub-process returned an error code

I tried every possible solution found on the internet to fix this error but not helpful. Please, somebody guide me to fix this. Thanks

1 Answers1

1

Have you added any third party repository? If yes, please try remove or disable them. Also, clear your "apt" cache and. To the steps bellow, you need to open a terminal and be confortable with it.

  • To remove/clean third party repositories:

    1. If they were added as includes to "sources.list":

    sudo rm -f /etc/apt/sources.list.d/*

    1. If they are in the "sources.list" file:
    • Edit the file:

    sudo nano /etc/apt/sources.list

    • Remove any entry that it's not from "canonical.com" or "ubuntu.com" (press CTRL+K to remove the line you're at the moment - look at the cursor)
    • Save the file and exit (press CTRL+X and confirm saving)
  • Clean up the "apt" cache folder (this will remove the folder):

    sudo rm -Rf /var/cache/apt

After the steps above, try running the command apt update, see if there are any errors left and let us know.

Best regards.

  • Also, try to reinstall the Appstream and it's library: sudo apt install --reinstall libappstream4 appstream and tell us. After reinstall it, run sudo appstreamcli refresh --force and check if there are any errors. Best regards. – Carlos Trentini Oct 20 '20 at 19:19
  • I ran into same error when I execute above comments https://pastebin.com/embed_js/RyDfEMPM – Nikhil R Oct 21 '20 at 11:49