0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Macの容量が足りない場合の対処法

0
Posted at

はじめに

Macで容量が足りなくなった時にやっていることをまとめました。
Flutterを使っている人には特に有効だと思います。

不要なファイル、アプリを整理する

システム - 一般 - ストレージで容量が大きい項目のびっくりマークを押して内容を確認
削除できるやつは削除していく
不要な動画、画像とかのファイル、使ってないアプリとかも削除する

全体的に容量確認したいときのコマンド

sudo du -m -d 1 /Library ~/Library | sort -n | tail -n 20

Dockerで不要なデータ削除

Dockerを確認し、不要なものは削除する

とりあえず、Xcodeで過去にビルド・作成したアプリのアーカイブデータ削除

rm -rf ~/Library/Developer/Xcode/Archives/*

iOS

iOSシミュレーターの容量確認
sudo du -m -d 1 /Library/Developer/CoreSimulator/

容量が大きかったら下記を試す

  • xcrun simctl listで作成済みのシミュレーターを確認
  • xcrun simctl delete unavailableで使えないシミュレーターを削除

もっと削除したければ以下も試す

  • XCodeのDevice and Simulatorsから不要なSimulatorは削除
    • iPadとか動作確認で使ってないSimulatorを消す
  • 設定のComponentsから不要なPlatformSupportを削除

それでも足りないならシミュレーター初期化
xcrun simctl erase all

Android

AndroidSDKの容量確認
sudo du -m -d 1 /Users/xxx/Library/Android/sdk

不要な昔のバージョンのAndroidSDKをAndroidStudioから削除
設定 - 言語とフレームワーク AndroidSDKを開く
Show Package Detailsにチェックを入れる
不要なSDKのチェックを外してApplyする

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?