That depends on what you mean by “get rid of”. It can help remove bed bugs from a mattress or some other areas which may help cut down on bed bug bites. It is also helpful during extermination to quickly take care of bed bugs in certain places. Vacuuming will not permanently get rid of bed bugs though. Vacuuming only removes the bed bugs you can find and vacuum up. It doesn’t have any effect on bed bugs that are out of sight, including well-hidden eggs.
That being said, it could be a good idea to vacuum your mattress and take a look at what turns up in your vacuum bag or canister. In this respect your vacuum is another handy bed bug detection tool. Don’t look at it like a one-stop solution to your bed bug problems though. And make sure you carefully dispose of your vacuum bag right away. Especially if you are vacuuming after you’ve already had an infestation. If there are bed bugs living inside your vacuum, you could re-infest your home.