Stem Docs

List Outdated Relays

List Outdated RelaysΒΆ


Time marches on. Tor makes new releases, and at some point needs to drop support for old ones. Below is the script we used on ticket 9476 to reach out to relay operators that needed to upgrade.

from stem.descriptor.remote import DescriptorDownloader
from stem.version import Version

downloader = DescriptorDownloader()
count, with_contact = 0, 0

print("Checking for outdated relays...")

for desc in downloader.get_server_descriptors():
  if desc.tor_version < Version(''):
    count += 1

      print('  %-15s %s' % (desc.tor_version,"utf-8", "replace")))
      with_contact += 1

print("%i outdated relays found, %i had contact information" % (count, with_contact))
% python
Checking for outdated relays...        Random Person        dobrovich_psckaal at vietrievus dot ok        anonymous6        anonymous12

316 outdated relays found, 120 had contact information