Well it's all right, every makes mistake.
Yes there is a way to do this.
The below command will basically remove all the docker images that are there in your local directory.
$ docker rmi -f $(docker images -a -q)
If you only want to remove the unused images use this command :
$ docker image prune -a
A disclaimer : You cannot remove any image if there is a container running using it, so you'll have to remove the container first and then the image.
You can remove all the containers and the volumes attached to them using this command :
$ docker rm -vf $(docker ps -a -q)
if you want to clear out everything in your docker system use this command :
$ docker system prune -a --volumes
Hope this helps :)
Also I understand docker can a be a bit tough, but it's fine, everything takes time. check out this Docker Training course if you are interested in getting trained by industry professionals.