$ du -sh .[^.]* * 12K .ansible 12K .aws 4.0K .bash_history 4.0K .bash_logout 4.0K .bashrc 9.9M .cache 166M .cargo 27M .config 40K .docker 240K .dotnet 4.0K .gitconfig 4.2M .kube 4.0K .lesshst 368M .local 4.0K .moc 0 .motd_shown 4.0K .profile 2.5G .rustup 4.0K .selected_editor 32K .ssh 0 .sudo_as_admin_successful 12K .terraform.d 65M .tfenv 4.0K .tmux.conf 4.0K .tmux.conf.20250102 568K .vifm 148K .vim 24K .viminfo 4.0K .vimrc 360K .vscode-remote-containers 730M .vscode-server 4.0K .wget-hsts 52K .zcompdump 40K .zsh_history 4.0K .zshenv 4.0K .zshrc 4.0K .zshrc.20230326 4.0K .zshrc.20251214 213M aws 213M aws_1 56M awscliv2.zip 4.0K bin 588K cmdref 512K dracula-theme 16K fuse 1.3M git 12K k8s 2.8M mc 4.0K mount.sh 64K test 4.0K test.txt 24K test1 32K test2 $
原因: Rustのツールチェーン(コンパイラや標準ライブラリ)の管理ディレクトリです。複数のバージョンをインストールしていたり、ターゲットアーキテクチャを追加していると肥大化します。
原因: VS Codeでリモート接続(SSHやWSLなど)した際に、サーバー側にインストールされる拡張機能やバイナリです。古いバージョンが残っていると増え続けます。
原因: 主に ~/.local/share 内に、ユーザー単位でインストールしたツールやアプリのデータ、ログなどが蓄積されています。
原因: AWS CLIの実行ファイルやインストーラが展開されたものと思われます。同じものが2つあるようです。
原因: Rustのパッケージマネージャ(Cargo)のキャッシュや、インストールされたバイナリが含まれます。
cd /home
USER=taka
sudo tar zcvf $USER.$(date +%Y%m%d).tar.gz \
--exclude="$USER/.rustup" \
--exclude="$USER/.vscode-server" \
--exclude="$USER/.local" \
--exclude="$USER/.cargo" \
$USER
tar tf $USER.$(date +%Y%m%d).tar.gz | grep -E '.rustup|.cargo|.vscode-server'
cp $USER.$(date +%Y%m%d).tar.gz /mnt/c/tmp/
cd ~
tar zcvf home_backup.tar.gz \
.aws .config .local .ssh .vifm .vim
.ssh .bash_history .bashrc .profile .vimrc \
.bashrc .gitconfig .profile .tmux.conf .vimrc \
.zsh_history .zshrc \
.
cp home_backup.tar.gz /mnt/c/tmp/