You will never get them all out and they can carry diseases. It would be better to throw away that flour and buy new. Then be sure to keep the new flour in a tightly-sealed plastic or metal container.
The bugs are weevils. Here is an article about them with photos: Weevil - Wikipedia, the free encyclopedia