I installed this new version of elementary OS 8.1 and kept running into issues with package installations.
To be honest, I’m not exactly sure what the root cause is, but in some cases—after installing something via the terminal or adding a repository—Flatpak would suddenly disappear, taking my Flatpak-based apps with it; this happened twice.
However, after consulting Claude, I found a troubleshooting solution that works, and I’m sharing it here. If anyone else is a beginner or doesn't know the fix, you can simply copy these commands. I even set up an alias for them in ~/.bashrc
.
sudo apt update
sudo apt install flatpak
apt-cache search appcenter
apt-cache policy appcenter
sudo apt install --reinstall appcenter
sudo flatpak update --appstream
flatpak repair
update-desktop-database ~/.local/share/applications 2>/dev/null
gnome-session-quit --no-prompt
or maybe you can try short version (if work)
flatpak repair && sudo flatpak update --appstream && update-desktop-database ~/.local/share/applications
or
alias icon_disapear_fix='sudo apt update && sudo apt install flatpak && apt-cache search appcenter && apt-cache policy appcenter && sudo apt install --reinstall appcenter && sudo flatpak update --appstream && flatpak repair && update-desktop-database ~/.local/share/applications 2>/dev/null && gnome-session-quit --no-prompt'
or you can change to another alias name
or maybe you can try short version (if work)
alias fix_flatpak='flatpak repair && sudo flatpak update --appstream && update-desktop-database ~/.local/share/applications'
and you must be Sign Out first from your session to refresh your flatpak app list