LoginSignup
13
15

More than 5 years have passed since last update.

Ubuntuのディスク容量を見る

Last updated at Posted at 2015-03-19

もちろんroot的なPermissionエラーが出た場合はsudoしてください。

fileが属するファイルシステムについての情報を表示する。-m MByte単位表示

df -m

ディレクトリ容量を調べる

du -h --max-depth=1 /

不要ファイルを探す

du -sh /usr/*

35M /usr/bin
4.0K /usr/games
17M /usr/include
140M /usr/lib
0 /usr/lib64
281M /usr/local
7.9M /usr/sbin
200M /usr/share
1.2G /usr/src

不要なファイルを削除
※気をつけて消してね

rm ファイル
or
rm -d ディレクトリ

apt のパッケージキャッシュをクリア

apt-get clean

依存関係のない不要なパッケージを削除

apt-get autoremove

13
15
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
13
15