Boats of the Baltic flotilla were based at either Kiel, Danzig, or Libau, but where "UB-5" was stationed during this time is not reported in sources. On 21 September 1916, "UB-5" was transferred to training duties. According to authors R.H. Gibson and Maurice Prendergast, submarines assigned to training duties were "war-worn craft" unfit for service. At the end of the war, the Allies required all German U-boats to be sailed to Harwich for surrender. "UB-5" was one of eight U-boats deemed unseaworthy and allowed to remain in Germany. "UB-5" was broken up by Dräger at Lübeck in 1919.