Celeb Glow
updates | March 19, 2026

add-apt-repository always throws an error

I'm currently facing this issue with add-apt-repository. Whenever I try to do anything (adding or even removing repos), I get this error:

Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 108, in <module> sp = SoftwareProperties(options=options) File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 118, in __init__ self.reload_sourceslist() File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 613, in reload_sourceslist self.distro.get_sources(self.sourceslist) File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 91, in get_sources raise NoDistroTemplateException(
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Elementary/next

Note that I am currently running Ubuntu 20.04, yet the error says something about Elementary OS.

I already looked for possible solutions (like this one with ppa-purge as well as some others), but none of them worked out.

Right now, I cannot add any repos to apt, which is super annoying.

Thanks in advance for your help!

1

1 Answer

Try this solution :

Also, try reinstalling software-properties-common package by the command sudo apt install --reinstall software-properties-common

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy