Logic and user expectation (speaking from experience with long lists in back-offices) would want to select all that actually is in view and act on it. I dont want to risk deleting or doing other actions on any other items I can't see.
If I want to act on everything at the same time, I would appreciate an option to show everything at once on the page, so I can select all and maybe unselect the few items I dont want to act on. But that option depends on your technical limitations.
Does your list have a very high number of items that would require too much ressources to load and display at once ? If that's the case this option is not viable. But in any case I think it's bad practice to act on items you can't see. Especially if the action is irreversible.
If not possible, select all by groups of 10/20/40/100/200 per page is quite enough. You would just have to let them select the number of items they can show on one page.
Hope that helps ! Good luck