If all you did was installing packages intended for another Linux distribution, the good news is that the system should be very much fixable. All your configuration files should still be present, so if you can get the packages back the way they were before the mishap, the system should be back in working order.
On the other hand, if you only used the system for a few days before the mishap, it might be still easier to mount an USB stick, copy all your data files (basically anything in your
/home directory tree if you're uncertain) to the USB stick, and then reinstall.
To mount an USB stick without any GUI tools:
First, before plugging in the USB stick, run
cat /proc/partitions. Then plug in the stick and run the same command again. The output after plugging in the USB stick should have about two more lines - those will identify the device name of the USB stick and its partition. For example, if plugging in the stick caused two devices named
sdc1 to appear, run
mount /dev/sdc1 /mnt. Now the USB stick should be accessible under
To make a compressed archive of anything under
/home, you might do something like this:
tar jcvf /mnt/saved-home.tar.bz2 /home
Before unplugging the USB stick, run
cd /; umount /mnt.
But if you want to try fixing the problem, read on...
The first step should probably be to undo your changes to the source list.
If you don't know what to put in there, the following lines should be a good universal starting point for Debian 10:
deb http://deb.debian.org/debian buster main contrib non-free
deb http://security.debian.org/ buster/updates main contrib non-free
If you want to explicitly use a repository that is geographically close to you, see the list of Debian mirrors.
But it sounds like the package conflicts caused the system to uninstall one or more packages that are essential for the network connection to work. As a result, you might have to use your installation media as a local package repository to get those essential packages back before you can get anything from network.
If your installation media is a CD/DVD, just insert the disc and run
apt-cdrom add. It should auto-detect the installation media in the CD drive and register it as usable with
If your installation media is a USB stick, plug it in, mount it e.g. under
/mnt (see above) and run
apt-cdrom -d /mnt add.
/var/log/dpkg.log is a text file that should have a timestamped record of all the recent package management operations (i.e. within a month or so), and
/var/log/dpkg.log.1, if it exists, has the same information from the previous month.
You should find any packages that got uninstalled in the mishap and re-install them, with
apt install <package-name>. You may want to check the list of metapackages at packages.debian.org and first install any metapackages that got uninstalled.
A metapackage is basically an empty package with a set of dependencies to packages related to a particular task or other logical group. For example, if you re-install metapackage
gdm3, that might restore at least rudimentary GUI functionality. That should allow you to get a package manager and
/var/log/dpkg.log on the screen simultaneously, and reinstalling the rest of removed packages should be easier.