OpenWRT中批量卸载多余的语言包
NanoPi R2C 官方FriendlyWrt 默认预装了所有语言包,有时在找软件包的时候全是语言包
首先把要卸载的语言包提取出来写入到文件中
opkg list-installed | grep '^luci-i18n-[a-zA-Z0-9]*-[a-zA-Z0-9-]*' -o | grep -wv zh-cn | cat > removelist
然后开始卸载
xargs -d '\n' -- opkg remove < removelist
最后删除清单
rm removelist
opkg list-installed | grep '^luci-i18n-[a-zA-Z0-9]*-[a-zA-Z0-9-]*' -o | grep -wv zh-cn | cat > removelist