bitcoin-tools / bitcoin-tools/nodebuilder
Prevent apt cache from growing over time
- 主要言語
- Shell
- スター
- 7
- フォーク
- 0
- 平均マージ
- 2時間 37分
- マージ済み PR(30日)
- 28
説明
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
```
for apt_cache_deb in /var/cache/apt/archives/*.deb; do
apt_cache_package=$(dpkg-deb --field "${apt_cache_deb}" Package)
if ! dpkg --list | grep --quiet "^ii ${apt_cache_package} "; then
echo "Deleting unused cache ${apt_cache_deb}"
rm "${apt_cache_deb}"
fi
done
```
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
コントリビューションガイド
調査の方向性
ファイルやテストは指定されていません。まず、パッケージをインストールするか /var/cache/apt/archives を管理するリポジトリのエントリポイントを見つけ、次にそのパスがどのように実行されるかを調べてください。未使用の .deb ファイルがインストール済みパッケージに影響を与えずに削除され、キャッシュが際限なく増え続けなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- infrastructure
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100