deleted postgres files on ubuntu I was cleaning out some files in /home/postgres, and accidentally deleted the directory named 10.  Now nothing works.  Here is the error I get when I try to run psql as the postgres user:
    psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket &quot;/var/run/postgresql/.s.PGSQL.5432&quot;?

What did I break, and how do I fix it?
Other info:
-This is a scratch database, so I am not very concerned about recovering old stored databases.  However, it would be easier for me if I could.
-I thought about doing an uninstall/reinstall using apt-get, but since things are in an unstable state, I thought it would be better to get some advice first.
-I am running postgres 10 on Ubuntu 18
That depends on what you deleted: was it the database data or the database software?
Since psql still works, I suspect that the database software is still there, and you deleted the data. Then the only way to recover is to restore from a backup.
No, there is no way to &quot;undelete&quot; data.