I followed this link exactly: http://wiki.ros.org/melodic/Installation/Ubuntu
I started with setting up my sources.list:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Then setup my keys:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Then ensured my Debian package was up to date:
sudo apt update
This is all worked fine until it came to installation, any of the variants
sudo apt install ros-melodic-desktop-full
Or
sudo apt install ros-melodic-desktop
Or
sudo apt install ros-melodic-ros-base
All give me the error unable to locate package ros-melodic-desktop-full or it's variants but I don't understand why. When installing these on my other laptop I never ran into any problems and both originally run Windows and are running Ubuntu on a virtual machine.