Google Ads removed by uninstalling com.google.android.gms Recently, I'm testing with my Android 6.0 phone and ADB tools. I list all applications with pm list packages. After installing and uninstalling (i.e. trial and error) some of the applications, I find that if I uninstall these two applications, other applications does not shows any type of advertises. Then I copy those APK files in SD card and execute these two commands with adb.exe shell to uninstall those two application.

pm uninstall --user 0 com.android.vending.apk
pm uninstall --user 0 com.google.android.gms.apk




Though I'm pleased with removing all advertises, I saw that Google Play Store and Google Account vanished from Home Screen. But I reinstall them from the APK files and it works properly. 

Question: Is Google Play application responsible for all those advertises in other apps? Can I remove those Ads providing links between apps and Play Store?

N.B: I'm new to this site. This question may be duplicate. I didn't find appreciable answer in other questions.
As pointed out in comments, ads come from two sources -apps and targeted ads by Google

For the latter removing GMS Services doesn't help, rather creates problems as you discovered , since GMS


  Google Mobile Services (GMS) is a collection of Google applications and APIs that help support functionality across devices. These apps work together seamlessly to ensure your device provides a great user experience right out of the box


Better ways to get rid of apps :


Follow steps mentioned in Google support - not very effective
Sign out of ads when you set up your Google account
Use an ad-blocker app which takes care of ads from both sources. Adguard
is one good app if your device is not rooted. If it's rooted, your choice widens and is more effective


PS : I am not associated with Adguard but properly configured , it's great a way to get rid of apps and also have firewall

Also see this for more information Where is data of Google Play Services located in device? Can I safely delete it?