Deleted category by mistake, all posts now have categorized category. Can i revert that?

There is no ‘undo’ option for this except reverting back to the most recent database export. That’s seems like a no go for this since it’s not ‘crucial’ (imo).

The quick fix I can think of is create a new category (with the same name etc.) and assign all posts to that category. The only thing you would have to check is that your code doesn’t ask for a hardcoded ID of this category. If so, you need to change that (or make it dynamic).