pop specific fragment from stack and remove others
You can add a tag to each fragment while adding them to the backstack and then popfragment from backstack till the fragment with the tag you want is not reached.
FragmentManager fm = getFragmentManager();for (int i = fm.getBackStackEntryCount() - 1; i > 0; i--) { if (!fm.getBackStackEntryAt(i).getName().equalsIgnoreCase(tagname)) { fm.popBackStack(); } else { break; }}