Вы можете попробовать это:
sed 's|\(//[^/]*\)%\([^/]*/\)|\1\2|g'
Объяснение
s # substitude
| # separator
\(//[^/]*\) # pattern start with // --> save in arg1 (\1)
% # pattern contains % --> ignore
\([^/]*/\) # pattern ends with / --> save in arg2 (\2)
| # separator
\1\2 # print arg1 and arg2
| # separator
g # global on whole line
тест
$ echo "https://delete%me.com/butnot%this" | sed 's|\(//[^/]*\)%\([^/]*/\)|\1\2|g'
https://deleteme.com/butnot%this
$ echo https://donotdelete.me/test | sed 's|\(//[^/]*\)%\([^/]*/\)|\1\2|g'
https://donotdelete.me/test