GNU/Linux >> Belajar Linux >  >> Ubuntu

Masalah Disk Penuh Di Ubuntu 16.04 (xenial Xerus)?

Pertanyaan ini sudah memiliki jawaban di sini :apt-get:Tidak ada ruang tersisa di perangkat (12.04)

(4 jawaban)
Tidak dapat memutakhirkan karena ruang disk rendah di /boot

( 8 jawaban)
Tutup 4 tahun yang lalu.

Saya ingin melakukan pembaruan, tetapi sepertinya disk saya penuh. Saya mencoba:

sudo apt-get install -f

tapi itu memberi saya output berikut:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
checkbox-ng fonts-inconsolata gir1.2-gconf-2.0 ko.tex-extra-hlfont
latex-sanskrit libarchive-extract-perl libboost-date-time1.54.0
libboost-system1.54.0 libcmis-0.4-4 libcolamd2.8.0 libept1.4.12 libglamor0
libglew1.10 libglewmx1.10 libgnome-desktop-3-7 libgphoto2-port10 libilmbase6
libimobiledevice4 libintl-perl libisl10 libllvm3.4 liblog-message-perl
liblog-message-simple-perl libmagick++5 libmagickcore5 libmagickcore5-extra
libmagickwand5 libmbim-glib0 libmodule-pluggable-perl libmodule-runtime-perl
libntdb1 libopenexr6 liborcus-0.6-0 libparams-classify-perl libpocketsphinx1
libpod-latex-perl libpoppler44 libprocps3 libprotobuf8 libprotoc8
libqmi-glib0 libqpdf13 libqt5qml-graphicaleffects libqt5sensors5
libqt5webkit5-qmlwebkitplugin libraw9 librhythmbox-core8 libsphinxbase1
libspice-server1 libsystemd-journal0 libsystemd-login0 libterm-ui-perl
libtext-soundex-perl libthumbnailer0 libunityvoice1 libupstart1 libxdelta2
libxtables10 linux-headers-3.13.0-29 linux-headers-3.13.0-29-generic
linux-headers-3.13.0-62 linux-headers-3.13.0-62-generic
linux-headers-3.13.0-95 linux-headers-3.13.0-95-generic
linux-headers-4.4.0-36 linux-headers-4.4.0-36-generic linux-headers-4.4.0-37
linux-headers-4.4.0-37-generic linux-headers-4.4.0-38
linux-headers-4.4.0-38-generic linux-headers-4.4.0-39
linux-headers-4.4.0-39-generic linux-headers-4.4.0-40
linux-headers-4.4.0-40-generic linux-headers-4.4.0-41
linux-headers-4.4.0-41-generic linux-headers-4.4.0-44
linux-headers-4.4.0-44-generic linux-headers-4.4.0-46
linux-headers-4.4.0-46-generic linux-headers-4.4.0-49
linux-headers-4.4.0-49-generic linux-headers-4.4.0-51
linux-headers-4.4.0-51-generic linux-headers-4.4.0-52
linux-headers-4.4.0-52-generic linux-headers-4.4.0-53
linux-image-3.11.0-19-generic linux-image-4.4.0-36-generic
linux-image-4.4.0-37-generic linux-image-4.4.0-38-generic
linux-image-4.4.0-39-generic linux-image-4.4.0-40-generic
linux-image-4.4.0-41-generic linux-image-4.4.0-44-generic
linux-image-4.4.0-46-generic linux-image-4.4.0-49-generic
linux-image-4.4.0-51-generic linux-image-4.4.0-52-generic
linux-image-extra-3.11.0-19-generic linux-image-extra-4.4.0-36-generic
linux-image-extra-4.4.0-37-generic linux-image-extra-4.4.0-38-generic
linux-image-extra-4.4.0-39-generic linux-image-extra-4.4.0-40-generic
linux-image-extra-4.4.0-41-generic linux-image-extra-4.4.0-44-generic
linux-image-extra-4.4.0-46-generic linux-image-extra-4.4.0-49-generic
linux-image-extra-4.4.0-51-generic linux-image-extra-4.4.0-52-generic m-tx
musixtex perlmagick pmx python-commandnotfound python-gdbm python-imaging-tk
python-ntdb python3-checkbox qml-module-qtquick-dialogs
qml-module-qtquick-localstorage qml-module-qtquick-privatewidgets
qml-module-ubuntu-ui-extras-browser qtdeclarative5-dialogs-plugin
qtdeclarative5-localstorage-plugin qtdeclarative5-privatewidgets-plugin
qtdeclarative5-qtfeedback-plugin
qtdeclarative5-ubuntu-ui-extras-browser-plugin
qtdeclarative5-ubuntu-ui-extras-browser-plugin-assets
qtdeclarative5-window-plugin sphinx-voxforge-hmm-en sphinx-voxforge-lm-en
swath ubuntu-core-launcher unity-scope-audacious unity-scope-clementine
unity-scope-gmusicbrowser unity-scope-gourmet unity-scope-guayadeque
unity-scope-musique unity-voice-service xdelta
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-headers-4.4.0-57 linux-headers-4.4.0-57-generic
The following NEW packages will be installed:
linux-headers-4.4.0-57 linux-headers-4.4.0-57-generic
0 upgraded, 2 newly installed, 0 to remove and 63 not upgraded.
2 not fully installed or removed.
Need to get 10,7 MB of archives.
After this operation, 77,8 MB of additional disk space will be used.
Do you want to continue? [O/n] o
Get:1 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-57 all 4.4.0-57.78 [9 949 kB]
Get:2 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-57-generic amd64 4.4.0-57.78 [779 kB]
Fetched 10,7 MB in 17s (610 kB/s)
(Reading database ... 1254217 files and directories currently installed.)
Preparing to unpack .../linux-headers-4.4.0-57_4.4.0-57.78_all.deb ...
Unpacking linux-headers-4.4.0-57 (4.4.0-57.78) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers 4.4.0-57_4.4.0-57.78_all.deb (--unpack):
unable to create '/usr/src/linux-headers-4.4.0-57/include/linux/capability.h.dpkg-new' (while processing './usr/src/linux-headers-4.4.0-57/include/linux/capability.h'): No space left on device
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../linux-headers-4.4.0-57-generic_4.4.0-57.78_amd64.deb ...
Unpacking linux-headers-4.4.0-57-generic (4.4.0-57.78) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-57-generic_4.4.0-57.78_amd64.deb (--unpack):
error creating directory './usr/src/linux-headers-4.4.0-57-generic/include/config/cross/memory': No space left on device
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-headers-4.4.0-57_4.4.0-57.78_all.deb
 /var/cache/apt/archives/linux-headers-4.4.0-57-generic_4.4.0-57.78_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

df memberikan output ini:

 Filesystem     1K-blocks     Used Available Use% Mounted on
udev             1941224        0   1941224   0% /dev
tmpfs             392292     6416    385876   2% /run
/dev/sda5       20027728 17160304   1827020  91% /
tmpfs            1961444     2952   1958492   1% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs            1961444        0   1961444   0% /sys/fs/cgroup
/dev/sda6      139057128 45511572  86458812  35% /home
cgmfs                100        0       100   0% /run/cgmanager/fs
tmpfs             392292      108    392184   1% /run/user/1001

sudo fdisk -l memberikan ini:

Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

 (edit: 15 more ram devices with the same size)

Disk /dev/sda: 232,9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe0a42c14

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1              63     80324     80262  39,2M de Dell Utility
/dev/sda2  *        81920   1622015   1540096   752M  7 HPFS/NTFS/exFAT
/dev/sda3         1622016 160710655 159088640  75,9G  7 HPFS/NTFS/exFAT
/dev/sda4       160712702 488394751 327682050 156,3G  5 Extended
/dev/sda5       160712704 201673641  40960938  19,5G 83 Linux
/dev/sda6       201674752 484489205 282814454 134,9G 83 Linux
/dev/sda7       484489216 488394751   3905536   1,9G 82 Linux swap / Solaris

ls /usr/src keluaran:

bcmwl-6.30.223.248+bdcom         linux-headers-3.13.0-66-generic  linux-headers-3.13.0-86-generic  linux-headers-3.8.0-35          linux-headers-4.4.0-44-generic
linux-headers-3.13.0-29          linux-headers-3.13.0-67          linux-headers-3.13.0-87          linux-headers-4.4.0-36          linux-headers-4.4.0-46
linux-headers-3.13.0-29-generic  linux-headers-3.13.0-67-generic  linux-headers-3.13.0-87-generic  linux-headers-4.4.0-36-generic  linux-headers-4.4.0-46-generic
linux-headers-3.13.0-46          linux-headers-3.13.0-74          linux-headers-3.13.0-88          linux-headers-4.4.0-37          linux-headers-4.4.0-49
linux-headers-3.13.0-46-generic  linux-headers-3.13.0-74-generic  linux-headers-3.13.0-88-generic  linux-headers-4.4.0-37-generic  linux-headers-4.4.0-49-generic
linux-headers-3.13.0-62          linux-headers-3.13.0-78          linux-headers-3.13.0-93          linux-headers-4.4.0-38          linux-headers-4.4.0-51
linux-headers-3.13.0-62-generic  linux-headers-3.13.0-78-generic  linux-headers-3.13.0-93-generic  linux-headers-4.4.0-38-generic  linux-headers-4.4.0-51-generic
linux-headers-3.13.0-63          linux-headers-3.13.0-80          linux-headers-3.13.0-94          linux-headers-4.4.0-39          linux-headers-4.4.0-52
linux-headers-3.13.0-63-generic  linux-headers-3.13.0-80-generic  linux-headers-3.13.0-94-generic  linux-headers-4.4.0-39-generic  linux-headers-4.4.0-52-generic
linux-headers-3.13.0-64          linux-headers-3.13.0-82          linux-headers-3.13.0-95          linux-headers-4.4.0-40          linux-headers-4.4.0-53
linux-headers-3.13.0-64-generic  linux-headers-3.13.0-82-generic  linux-headers-3.13.0-95-generic  linux-headers-4.4.0-40-generic
linux-headers-3.13.0-65          linux-headers-3.13.0-85          linux-headers-3.8.0-19           linux-headers-4.4.0-41
linux-headers-3.13.0-65-generic  linux-headers-3.13.0-85-generic  linux-headers-3.8.0-32           linux-headers-4.4.0-41-generic
linux-headers-3.13.0-66          linux-headers-3.13.0-86          linux-headers-3.8.0-34           linux-headers-4.4.0-44

Sunting: Seperti yang disarankan dalam komentar dan pertanyaan di bawah, berikut adalah df -i keluaran:

Filesystem      Inodes   IUsed   IFree IUse% Mounted on
udev            485306     582  484724    1% /dev
tmpfs           490361     854  489507    1% /run
/dev/sda5      1281120 1278500    2620  100% /
tmpfs           490361      17  490344    1% /dev/shm
tmpfs           490361       6  490355    1% /run/lock
tmpfs           490361      18  490343    1% /sys/fs/cgroup
/dev/sda6      8839168   81878 8757290    1% /home
cgmfs           490361      14  490347    1% /run/cgmanager/fs
tmpfs           490361      45  490316    1% /run/user/1001

Jawaban yang Diterima:

Anda memiliki banyak kernel yang diinstal, mereka memakan banyak ruang (300 MiB per kernel). Anda juga memiliki sejumlah besar paket lain yang diinstal sebagai dependensi dan, karena berbagai alasan, tidak diperlukan lagi.

Terkait:Bagaimana cara terhubung ke server melalui SCP di Lubuntu 15?

Anda dapat membersihkan semua itu dengan aman dengan perintah berikut:

sudo apt autoremove

Jadi, seperti yang Anda jelaskan di komentar, setelah melakukan hal itu, Anda mendapatkan kesalahan berikut:

The following packages have unmet dependencies:
 linux-headers-generic : Depends: linux-headers-4.4.0-57-generic but it is not installed
E: Unmet dependencies. Try using -f.

Anda berada di tempat yang sempit! Sebelum membersihkan paket, APT ingin memperbaiki yang sekarang, yaitu menginstal paket yang hilang. Tapi tidak ada ruang untuk itu!

Apa yang perlu dilakukan dalam hal ini untuk mengosongkan ruang disk dengan cara lain. Mungkin Anda memiliki file lama dan file sementara yang dapat Anda hapus. Tetapi karena perintah Anda di atas membantu mencantumkan banyak paket yang tidak diperlukan lagi , kita dapat menghapus beberapa di antaranya secara manual, menggunakan dpkg perintah.

Perhatikan bahwa menggunakan dpkg tanpa berpikir matang bisa berbahaya.

linux-image dan linux-image-extra mengambil banyak ruang, jadi mari kita ambil beberapa dari daftar tidak diperlukan lagi dan hapus dengan dpkg :

sudo dpkg --remove linux-image-extra-4.4.0-36-generic
sudo dpkg --remove linux-image-4.4.0-36-generic
sudo dpkg --remove linux-image-extra-4.4.0-37-generic
sudo dpkg --remove linux-image-4.4.0-37-generic
sudo dpkg --remove linux-image-extra-4.4.0-38-generic
sudo dpkg --remove linux-image-4.4.0-38-generic

Sunting: Ternyata ini tidak menyelesaikan masalah. Setelah berdiskusi dalam obrolan, dan seperti yang disarankan oleh orang lain di sini, Anda menjalankan df -i dan ternyata partisi Anda “hanya” dapat menyimpan 1,2 juta file, dan semua slot telah digunakan.

linux-headers paket tidak sebesar linux-image , tetapi berisi banyak dari file. Jadi mari kita ambil beberapa dari daftar tidak diperlukan lagi dan hapus dengan dpkg :

sudo dpkg --remove linux-headers-4.4.0-36 linux-headers-4.4.0-36-generic
sudo dpkg --remove linux-headers-4.4.0-37 linux-headers-4.4.0-37-generic
sudo dpkg --remove linux-headers-4.4.0-38 linux-headers-4.4.0-38-generic

Sekarang setelah ruang disk dan inode telah dibebaskan, paket yang hilang dapat diinstal:

sudo apt install linux-headers-4.4.0-57 linux-headers-4.4.0-57-generic

Dan sekarang APT senang bahwa semua dependensi paket telah terinstal dan semuanya baik-baik saja di mesin, kami dapat memberitahunya untuk secara otomatis menghapus semua paket yang tidak diperlukan lagi:

sudo apt autoremove

Ubuntu
  1. Cara Instal Node.js di Ubuntu 16.04 Xenial Xerus Linux server

  2. Cara menginstal Android Studio di Ubuntu 16.04 Xenial Xerus Linux

  3. Masalah Untuk Menginstal Eclipse Di Ubuntu 15.04?

  1. Instal AMDGPU-PRO 16.50 di Ubuntu 16.04 Xenial Xerus Linux

  2. Cara me-restart jaringan di Ubuntu 16.04 Xenial Xerus Linux

  3. Masalah Instalasi Ubuntu 18.04?

  1. Unduh gambar ISO Ubuntu Xenial Xerus 16.04 Linux dengan zsync

  2. Instalasi TeamViewer di Ubuntu 16.04 Xenial Xerus Linux

  3. Cara menginstal Browser Google Chrome di Ubuntu 16.04 Xenial Xerus Linux