I'm very dumb and I somehow managed to break my sources.d file in the /etc/apt/ directory. Is there a way to restore it?
There should be an
/etc/apt/sources.list.d directory, containing the sources for your system package manager. Alternative file paths include
You can't really break it, as it is either 1) a directory containing further configuration files, or 2) a plain text file itself.