LoginSignup
1
1

More than 5 years have passed since last update.

Mac ディスク容量のシステムが105Gになっていたので対応した

Posted at

やったこと

タイトルの通り

解決策

$ sudo du -g -x -d 5 /| awk '$1 >= 5{print}'
38  /Applications/MAMP/htdocs/wordpress/wp-content
38  /Applications/MAMP/htdocs/wordpress
38  /Applications/MAMP/htdocs
39  /Applications/MAMP

上記のコマンドですが、意味は、
duコマンドでディスクの使用量を表示
-x 異なるファイルシステム(パーティション)にあるディレクトリをスキップ
-d5 集計するディレクトリの深さを5に指定する

awkコマンドでテキストの加工とパターン処理
$1 >= 5{print}で5G以上の容量があるファイル(ディレクトリ)を探索

MAMPでWPを実装していた。こいつはキャッシュを残して実装ができるやつ

削除

$ rm -rf /Applications/MAMP

結果

システム容量かなり空きができました。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1