How can I clean up Connect to Server's recent servers?

My Recent Servers list of Nautilus' Connect to Server dialog is cluttered because instead of listing the recent connections, it lists all the connections I've ever made.

Connect to Server dialog

It is annoying because every time I try to find an entry I have to scroll through a lot of references to old, already dead, servers. I don't want to bookmark the connection because I have a big bookmark list, which I don't want to clutter, too.

Where on disk is this list stored? Or, how can I clean it up?


Solution 1:

Easily you can edit the file:

gedit ~/.config/nautilus/servers

You can edit the file and remove some entries or if you just want to delete all history you can remove this file:

rm ~/.config/nautilus/servers

Solution 2:

I was also trying to clear the "recent servers" list on Nautilus.
I use Ubuntu 18. I found the file servers at this location:

~/.config/gtk-3.0/