Requires root (at least on 6.0.1). System permissions (uid<=1000) is required but
adb runs as userid 2000.
The Package Manager (
pm) will do exactly what you want.
adb or Terminal Emulator (both require root), run the
pm command and you can see its capabilities.
We look at 2 of them:
pm list packages
pm disable <package>
pm list packages lists all installed packages, this list is unsorted but if you know some easy bash, you can use
grep to search for substrings in the package names:
pm packages list | grep google will list all packages with "google" in their name, effectively returning just Google's apps:
pm disable <package name> disables a single package you specified. Disabling the Google Keyboard would then be
pm disable com.google.android.inputmethod.latin.
To find out what package name maps to what app try this url:
<package name> with the package name you want to check.
Instead of using
pm, you can use Titanium Backup, given that your device is rooted.
In Titanium Backup you can scroll through all your apps, filter that list and select the app you want to disable or in TB's case freeze.
This, however, requires the paid version of Titanium Backup.