本文档提供指南,说明如何在 Windows PowerShell 中使用 Scoop 进行软件的更新、备份和恢复。
以下命令行操作会首先更新所有通过 Scoop 安装的应用程序,清理不再需要的旧版本,移除缓存,然后备份当前的应用列表到 JSON 文件,并更新到 GitHub Gist。
scoop update * ; scoop cleanup * ; rm "$HOME\scoop\cache\*" -fo ; `
scoop export | Out-File -FilePath "$HOME\scoopfile.json" -Encoding UTF8 ; `
gh gist edit 2210516c5fdf80dbf2e108ddd51869b2 -a $HOME/scoopfile.json