I don't generally have this problem, I think because I host in my own home.
I provide coffee, sugar and a range of different teas etc. for guests. However, all of these are in decorative cannisters or jars by the kettle, rather than the original packets, so no one has taken them away. I've even had guests use a bit of filter coffee and then replace it with a whole bag!
I supply some travel size toiletries, razors, toothbrushes etc. in the bedrooms, which guests are welcome to take if they want (some do, some don't) but only one of each thing in each bedroom. Then, in the bathroom, I have full size bottles of shower gel, shampoo etc. labelled for guest use.
When I show them around, I tell them they are welcome to use these things but to please not help themselves to other food/drink/toiletries as they might belong to my housemate or another guest. This has worked 99% of the time.
I think in a whole unit though guests tend to think any consumables are theirs for the taking. Even though it seems rude to me to take the whole bag of coffee, they might not see it that way!
@Jacqueline58Do you do a welcome tour when your guests arrive, or leave them any instructions? If so, perhaps you could politely say something like, please help yourself to tea, coffee etc. but I'd be grateful if you didn't take it away with you.