If the superior landlord wants the subtenant to leave, they first need to end the tenancy they have with the immediate landlord. A subtenancy continues for as long as the immediate landlord’s tenancy continues, even if the immediate landlord does not have the superior landlord’s consent to sublet the property. If the superior landlord ends the immediate landlord’s tenancy, then they can evict the subtenant unless the subtenant can show that the superior landlord granted them permission to be there e.g. by accepting rent from the subtenant.