New review comment by lemmi on void-packages repository https://github.com/void-linux/void-packages/pull/38978#discussion_r959155179 Comment: I quickly hacked up this contraption, but it also just ran `:sort` in vim. Might me locale difference? ```bash xrmpkg() { local toremove=$1 local toremovever=$(xbps-uhelper getpkgversion $(xbps-query -Rp pkgver "${toremove}")) # 1.2_3 local subpkgs=$(xsubpkg "${toremove}" | xargs -I{} echo "srcpkgs/{}") # remove package and subpkg symlinks git rm -r srcpkgs/"${toremove}" ${subpkgs} # add the pkg<=version string to removed-packages vim -es "+%s/replaces=\"/replaces=\"\r ${toremove}<=${toremovever}" '+wq' srcpkgs/removed-packages/template vim -es '+0/replaces=/+1,\//\"/sort' '+wq' srcpkgs/removed-packages/template vim -es '+0/replaces=/+1,\//\"/uniq' '+wq' srcpkgs/removed-packages/template # remove any mentions from shlibs, this might match too much vim -es "+%g/${toremove}/d" '+wq' common/shlibs # prepare commit, check changes git commit -e -v -m "${toremove}: remove package" -- srcpkgs/"${toremove}" ${subpkgs} srcpkgs/removed-packages/template common/shlibs } ```