deletes the linked list.