I've been trying to set up a tor relay, but I ended up deleting the /etc/tor/torrc configuration file after messing it up too much and figuring that tor would create a new unmodified config file after failing to locate it. This didn't turn out to be the case, and reinstalling the tor package didn't restore the config file either.
So in general, what can be done to reset a software package, restoring its configuration state back to when it was first installed? This problem has plagued me before but I haven't come across the solution yet.
Thanks!
Edit: I'm running Ubuntu 18.04
dpkg -S /etc/tor/torrc
will tell you the package that it came from (tor: /etc/tor/torrc on my release) and then you could trydpkg-reconfigure tor
to re-run the post-install setup script (what it does depends on what the packager had it do, but it's what I'd try) – guiverc Jun 13 '20 at 01:03dpkg-reconfigure tor
didn't restore the default configuration files. I deleted/etc/tor
and ran the command again, but that didn't do it either... – Morgan087 Jun 13 '20 at 17:51