Quick answer: Run snap remove snap-store then snap install snap-store in a terminal. That usually fixes it.
This problem shows up a lot on Ubuntu 22.04 LTS. You open the Software Center, click the search bar, type a few letters, and boom — the window disappears or freezes. Sometimes you see a spinning wheel forever. The real cause is almost always a broken snap package or a corrupted cache file. The Software Center on Ubuntu 22.04 is actually a snap package called snap-store. When that snap gets out of sync with your system, it crashes during search.
I've seen this happen after a system update, or after you install or remove a bunch of apps. A part of the snap's internal database goes bad. Don't waste time reinstalling the whole desktop. Just fix the snap.
Step-by-Step Fix
- Close the Software Center if it's still running. Right-click its icon in the dock and choose Quit. Or press Ctrl+Alt+T to open a terminal and run
pkill snap-store. - Open a terminal. Press Ctrl+Alt+T on your keyboard. You'll see a black window with a prompt.
- Remove the snap-store package. Type this command and press Enter:
snap remove snap-store
You'll see a message like "snap-store removed". After that, your Software Center icon will disappear from the dock. That's normal. - Reinstall the snap-store. Type this command and press Enter:
snap install snap-store
It will download and install the latest version. Wait until you see "snap-store installed" at the end. This can take a minute depending on your internet speed. - Open the Software Center again. Press the Super key (Windows key) and type "Software". Click the icon. It should start without any error. Try typing something in the search bar — like "Firefox" or "Calculator". The search should work now without crashing.
If the Software Center still crashes after reinstall, move to the alternative fixes below.
Alternative Fixes
Clear the cache manually
Sometimes the old cache sticks around even after reinstall. Run these commands in the terminal one by one:
rm -rf ~/.cache/gnome-software
rm -rf ~/.local/share/gnome-software
rm -rf ~/.cache/snap-store
Then launch the Software Center again. The cache rebuilds on first start, so it might take 10 seconds to load. That's fine.
Update all snap packages
An outdated snap can cause conflicts. Run this in the terminal:
snap refresh
This updates every snap package you have installed. After it finishes, restart the Software Center.
Use the flatpak version instead
If the snap version keeps breaking on you, switch to the flatpak version of GNOME Software. Flatpak is another package system — it's more stable for this app. Run these commands:
sudo apt update
sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.gnome.Software
Then launch it by running flatpak run org.gnome.Software. It won't replace the snap version in your dock, but you can create a launcher for it. I've had fewer crashes with the flatpak version.
Prevention Tip
Don't let snap packages update automatically in the background without checking. I know — snap updates are automatic by default. But sometimes a partial update corrupts the store. I recommend running snap refresh once a week manually. This way you control when it updates. Also, if you ever see the Software Center acting slow, close it and clear the cache before it gets worse.
One more thing — if you're on Ubuntu 24.04 or newer, this specific bug is less common. The snap-store was rewritten there. But the same fix works if it happens.