sajad torkamani
egrep -v '^#|^ *$' /etc/apt/sources.list /etc/apt/sources.list.d/*

This should output something like:

/etc/apt/sources.list:deb http://mirrors.digitalocean.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://mirrors.digitalocean.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://mirrors.digitalocean.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://mirrors.digitalocean.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://mirrors.digitalocean.com/ubuntu/ focal multiverse
Tagged: Ubuntu