Cannot update flatpak

This has been going on quite a while now. Each time I try to update flatpak by terminal I get the error message, ie on flatpak update:

‘Error updating: While pulling appstream2/x86_64 from remote flathub: No such metadata object aabbfd2b681ea5ee34db778dfe2ef2af7e6968b2ec4387ff66955fdccb8bb183.commit’

I’ve always found flatpak easy for installing software or to update. On Endeavouros, I have no problem updating flatpak. I haven’t tried removing and reinstalling flatpak yet. So please - any ideas what might be the cause here before I try that?

try

flatpak repair

and

flatpak update -v

flatpak -h:

Usage:
  flatpak [OPTION…] COMMAND

Builtin Commands:
 Manage installed applications and runtimes
  install                Install an application or runtime
  update                 Update an installed application or runtime
  uninstall              Uninstall an installed application or runtime
  mask                   Mask out updates and automatic installation
  pin                    Pin a runtime to prevent automatic removal
  list                   List installed apps and/or runtimes
  info                   Show info for installed app or runtime
  history                Show history
  config                 Configure flatpak
  repair                 Repair flatpak installation
  create-usb             Put applications or runtimes onto removable media
  preinstall             Install flatpaks that are part of the operating system

 Find applications and runtimes
  search                 Search for remote apps/runtimes

 Manage running applications
  run                    Run an application
  override               Override permissions for an application
  make-current           Specify default version to run
  enter                  Enter the namespace of a running application
  ps                     Enumerate running applications
  kill                   Stop a running application

 Manage file access
  documents              List exported files
  document-export        Grant an application access to a specific file
  document-unexport      Revoke access to a specific file
  document-info          Show information about a specific file

 Manage dynamic permissions
  permissions            List permissions
  permission-remove      Remove item from permission store
  permission-set         Set permissions
  permission-show        Show app permissions
  permission-reset       Reset app permissions

 Manage remote repositories
  remotes                List all configured remotes
  remote-add             Add a new remote repository (by URL)
  remote-modify          Modify properties of a configured remote
  remote-delete          Delete a configured remote
  remote-ls              List contents of a configured remote
  remote-info            Show information about a remote app or runtime

 Build applications
  build-init             Initialize a directory for building
  build                  Run a build command inside the build dir
  build-finish           Finish a build dir for export
  build-export           Export a build dir to a repository
  build-bundle           Create a bundle file from a ref in a local repository
  build-import-bundle    Import a bundle file
  build-sign             Sign an application or runtime
  build-update-repo      Update the summary file in a repository
  build-commit-from      Create new commit based on existing ref
  repo                   Show information about a repo

Help Options:
  -h, --help              Show help options

Application Options:
  --version               Print version information and exit
  --default-arch          Print default arch and exit
  --supported-arches      Print supported arches and exit
  --gl-drivers            Print active gl drivers and exit
  --installations         Print paths for system installations and exit
  --print-updated-env     Print the updated environment needed to run flatpaks
  --print-system-only     Only include the system installation with --print-updated-env
  -v, --verbose           Show debug information, -vv for more detail
  --ostree-verbose        Show OSTree debug information

flatpak repair -I got this after 10 minutes of disk activity:

Working on the system installation at /var/lib/flatpak
Privileges are required to make changes; assuming --dry-run
[1/21] Verifying flathub:runtime/org.kde.Platform/x86_64/5.15-25.08…

flatpak update -v - then:

F: No installations directory in /etc/flatpak/installations.d. Skipping 
F: Opening system flatpak installation at path /var/lib/flatpak 
F: Opening user flatpak installation at path /home/bendipa1/.local/share/flatpak 
Looking for updates… 
F: Fetching summary index file for remote ‘flathub’ 
F: Loading https://dl.flathub.org/repo/summary.idx using curl 
F: Received 10001 bytes 
F: Loaded indexed summary file b62f6808c49a640362c3685f740b409c2291edf693782092dafe9e00b2e27ef2 from cache for remote ‘flathub’ 
F: Transaction: update flathub:app/org.openshot.OpenShot/x86_64/stable\[\*\] 
F: Transaction: update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/25.08\[\*\] 
F: Transaction: update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/25.08-extra\[\*\] 
F: Transaction: update flathub:runtime/org.freedesktop.Platform.VAAPI.Intel/x86_64/25.08\[\*\] 
F: Transaction: update flathub:runtime/org.freedesktop.Platform.codecs-extra/x86_64/25.08-extra\[\*\] 
F: Transaction: update flathub:runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22\[\*\] 
F: Transaction: update flathub:runtime/org.kde.KStyle.Adwaita/x86_64/5.15-25.08\[\*\] 
F: Transaction: update flathub:runtime/org.kde.Platform.Locale/x86_64/5.15-25.08\[/en\] 
F: Transaction: update flathub:runtime/org.kde.Platform/x86_64/5.15-25.08\[\*\] 
F: Transaction: update flathub:runtime/org.openshot.OpenShot.Locale/x86_64/stable\[/en\] 
F: Looking for remote metadata updates for flathub 
F: marking op update:runtime/org.openshot.OpenShot.Locale/x86_64/stable resolved to 9166d49b0f5b642fd4e0d352fe4bc67b1a1d0d96a2a20251d608a6985fe75aa3 
F: marking op update:runtime/org.kde.Platform/x86_64/5.15-25.08 resolved to 1e9b0aa4623015cebd20350b36dc515124567b0f43c2235bd4ea8259fc2b18de 
F: marking op update:runtime/org.kde.Platform.Locale/x86_64/5.15-25.08 resolved to 43dc06e4dc4aa7a3c6a9f990678da1cdbc7f22cc8e2cb9640ef74ad7c29fec5a 
F: marking op update:runtime/org.kde.KStyle.Adwaita/x86_64/5.15-25.08 resolved to 6bc01b50011808ba23e21f324e34939ac2417585da0420a8789601f288700289 
F: marking op update:runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22 resolved to 77495563abf1b523c653bf0b211c39fda1596cde833768baee4894f91b285c8c 
F: marking op update:runtime/org.freedesktop.Platform.codecs-extra/x86_64/25.08-extra resolved to 4ac6fc6727e278ddff768b8996a9240ef3f40becead3b70289faa43314934
c5b 
F: marking op update:runtime/org.freedesktop.Platform.VAAPI.Intel/x86_64/25.08 resolved to 8983ce4b3afd9da43c9ad7486eb732bb1b2ff64ec6f7171b2aade5a6fe899832 
F: marking op update:runtime/org.freedesktop.Platform.GL.default/x86_64/25.08-extra resolved to 4a2f702604835090c94ae8806aa9d91ab03cd294aedb3e0e24fc49d492d781e
b 
F: marking op update:runtime/org.freedesktop.Platform.GL.default/x86_64/25.08 resolved to c8dc1156588776045866acd53f9090c90fa84fdff0e74ee4e859ebfc80fb671d 
F: marking op update:app/org.openshot.OpenShot/x86_64/stable resolved to f7fdf14a7fc34ce0300f39373a17b097f82200ded2ca6c18c5ff4fae48bbee78 
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/25.08\[\*\] 
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/25.08-extra\[\*\] 
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.VAAPI.Intel/x86_64/25.08\[\*\] 
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.codecs-extra/x86_64/25.08-extra\[\*\] 
F: Transaction: install/update flathub:runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22\[\*\] 
F: Transaction: install/update flathub:runtime/org.kde.KStyle.Adwaita/x86_64/5.15-25.08\[\*\] 
F: Transaction: install/update flathub:runtime/org.kde.Platform.Locale/x86_64/5.15-25.08\[/en\] 
F: Transaction: install/update flathub:runtime/org.openshot.OpenShot.Locale/x86_64/stable\[/en\] 
F: Checking installation ‘system’ for EOL unused refs and autoprunes 
F: Checking installation ‘system’ by checking for dependent refs in ‘user’ 
 
Nothing to update. 
F: flathub:x86_64 appstream age 14257480 is greater than ttl 86400 
Updating appstream data for remote flathub 
F: Fetching summary index file for remote ‘flathub’ 
F: Loading https://dl.flathub.org/repo/summary.idx using curl 
F: Received 10001 bytes 
F: Loaded indexed summary file b62f6808c49a640362c3685f740b409c2291edf693782092dafe9e00b2e27ef2 from cache for remote ‘flathub’ 
F: flatpak_dir_pull: Using commit 31ac43a26b858615860e94ecfbac122b018109c98e7df86a0f9233b544c9993d for pull of ref appstream2/x86_64 from remote flathub 
Error updating: While pulling appstream2/x86_64 from remote flathub: No such metadata object aabbfd2b681ea5ee34db778dfe2ef2af7e6968b2ec4387ff66955fdccb8bb183.c
ommit

So same error shown in last lines of code.

Now with sudo

sudo flatpak repair

If the above does not help I would delete temporary repository files

$ sudo rm -rf /var/lib/flatpak/repo/tmp/*

and cached flathub references:

$ sudo rm -rf /var/lib/flatpak/repo/refs/remotes/flathub

Afterwards, it’s recommendable to execute:

$ flatpak update
$ flatpak uninstall --unused

@Teo

Same output as before. On a side note I can still remove and install applications from flatpak and those app works just fine. So it’s not like flatpak is unusable.

@Wollie

sudo rm -rf /var/lib/flatpak/repo/tmp/\*
sudo rm -rf /var/lib/flatpak/repo/refs/remotes/flathub

Thanks. That worked. Updating flatpak no longer produces that error (above).


Mod Edit:- @bendipa1

  1. Corrected command output presentation – use code fences! :eyes:
  2. Avoid consecutive posts – edit your previous post, and use @mentions to reply to multiple members from within the same post. :eyes: