- Connect phone with USB debugging ON
- Select File Transfer Option for the USB (it can work without this option, but it’s recommended for more stability.)
- Go to the location:
C:\Users\Name\AppData\Local\Android\Sdk\platform-toolsor similar as per your system - Left click on the empty space and click on OPEN IN TERMINAL
.

The terminal should now be open.

First, check if the device is actually connected by typing: ./adb devices .You will get the list of devices connected and their respective ID.
NOT REQUIRED: you can access all commands by typing: ./adb
Uninstalling a file is not just as simple as writing the apk name. You will have to mention the Package name
• Write the code: ./adb shell pm list packages -s
• This will give you the list of all system packages, if you want to search for a particular package use the code: ./adb shell pm list packages -s | findstr <name>
• Example: ./adb shell pm list packages -s | findstr camera
• Write the code: ./adb shell pm list packages -3
• To search for a particular package: ./adb shell pm list packages -3 | findstr <name>
• Example: ./adb shell pm list packages -3 | findstr What (it will give result for whatsapp and any app with “what” in its name)
• Write the code: ./adb shell pm list packages
• To search for a particular package: ./adb shell pm list packages | findstr <name>
Now you should have the required package name.
If you are not able to find the package name after searching for it. Then you probably are using the full name of an application to find its package. You should try to shorten it as much as you can.
Sometimes an application's name might not even match its package name. You can search the package name on the net to check what application it belongs to. Since all applications have a package name attached to them you will find the respective package name directly from the net.
• Write the code: ./adb shell pm uninstall --user 0 <package name>
• Example: ./adb shell pm uninstall --user 0 com.instagram.android
and it's DONE.
• If you have accidentally deleted a package, you can recover the said package by using: ./adb shell pm install-existing <package name>
If the above code doesn't work you can use: ./adb shell cmd install-existing <package name>
• Make sure that you are not omitting any ./ from the code. Or have copied any formatting spaces (blank spaces)
• Forgetting to turn on USB Debugging