sudo snap find error
sudo snap f…

You’re reading this post because you’re confused.

Confused as to why running this command:

sudo snap find

now returns this error:

error : cannot list snaps: empty query

instead of showing you a sprawling list of super new Snap packages available to install.

This Error Is Not a Bug, It’s Intentional

Well, first things first: you’re not crazy. This isn’t a bug, and nothing is wrong with your snapd install.

This is intentional.

Canonical don’t want users to discover snaps this way — or rather they say users don’t want to discover Snaps in this way.

That is according to Canonical’s John Lenton, who explains:

“snap find” without arguments has not shown “all available snaps” in quite a while; it would show 100 arbitrary snaps. That is expensive and never what the user wanted, so in 2.11 we stopped doing that.

A frustrating, if understandable, position. Even though the ‘snap find’ command only shows 100 (random) Snaps (and there are now more than 100 snaps available) the fact you could get a list of them right there in the terminal where you interact with Snapd was — I’m lazy, I know — super convenient.

I enjoyed being able to take a peeksie at what Snaps were available in one straightforward command.

It suddenly changing, or rather working in a different way, is confusing.

Lenton continues with the rationale, explaining why ‘snap find’ is not an analog to the familiar ‘apt find’ command as many of us had, until now, treated it as:

Having ‘snap find’ return all snap packages is expensive, both on server resources (to get, collate and serialise everything), network bandwidth (to transmit the dump), and client resources (to display all of that). It would also force us to support pagination of the store queries in snapd, and of snapd respones (sic) in the client (as well as making supporting caching a higher-priority issue), which is a lot of work for a use case that is not at all clear is that interesting.

Especially considering that the (ubuntu) store has a public, documented REST API you can query directly if you absolutely need the list of snaps for some reason. http://search.apps.ubuntu.com/docs/#snap-specific-endpoints

We’ll probably bring back empty “snap find” as part of the discovery story, but that’s down the road a while.

So ‘snap find’ is gone — but not entirely.

Before you reach for one of these ‘snap specific endpoints’, like the Ubuntu Store (the same Ubuntu Store which is woeful for discovering and delineating Snaps) try this:

sudo snap find .

Et voila:
Screen Shot 2016-08-04 at 21.38.53

Hurrah! Panic over.

Yes, you now simply need to pass an argument to the snap find command. E.g.,

snap find telegram

Alternatively, the wonderful uappexplorer website now has a CLI available as a snap. This makes it super-duper easy to see a list of available Snap packages for the desktop, sort them by name, update, creation date, and so on.

Post edited to mention alternative solutions

snapd snappy