0

My raspberry get full, I tried delete a lot of packages but even though nothing change ,it still full, I tried also to expand file system ....

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G   14G     0 100% /
devtmpfs        805M     0  805M   0% /dev
tmpfs           934M     0  934M   0% /dev/shm
tmpfs           934M  8.5M  926M   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           934M     0  934M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   54M  199M  22% /boot
tmpfs           187M     0  187M   0% /run/user/1000
user535733
  • 62,253
  • 2
    We generally recommend that you copy/paste output into your question instead of using screenshots. It's much easier for everybody. Deleting packages rarely frees up space. You must use du to determine what's taking up all your space. – user535733 Jan 11 '21 at 18:57

1 Answers1

0

If the full drive was caused by software upgrade, you can try clearing up the apt cache:

sudo apt clean

If it is caused by system logs, follow the answer posted in this AskUbuntu question: https://askubuntu.com/a/100460 Then, identify which service is writing the immense amount of log entries (you will need to fix that so it won't keep happening in the future).

Alternatively, you might want to consider upgrading to a bigger MicroSD card (say, 32GB or 64GB, instead of 16GB)...

wyphan
  • 337
  • I tried it , nothing change – Sally Manasrah Jan 11 '21 at 19:15
  • Then it's not due to apt cache. Use du as suggested by @user535733 to figure out which directory is taking up all the space. Using the -h option to convert to prefixes (k,M,G, ...), and sorting the output might help, i.e. du -h | sort -h – wyphan Jan 11 '21 at 19:18
  • when execute du -s it gives : 377104 – Sally Manasrah Jan 11 '21 at 19:22
  • 1
    Try du -h | sort -h – wyphan Jan 11 '21 at 19:23
  • all the results shown that node red take a lot of space , but i cant delete it , is there a way to delete some nodes not all node red – Sally Manasrah Jan 11 '21 at 19:24
  • 2
    Can you post, say, the last 10 or 20 lines of the output from du -h | sort -h and put it in the question? – wyphan Jan 11 '21 at 19:25
  • 4.9M ./.node-red/node_modules/lodash 5.9M ./.cache/node-gyp/12.19.0/include/node/openssl 6.9M ./.cache/node-gyp 6.9M ./.cache/node-gyp/12.19.0 6.9M ./.cache/node-gyp/12.19.0/include 6.9M ./.cache/node-gyp/12.19.0/include/node – Sally Manasrah Jan 11 '21 at 19:27
  • 7.6M ./.node-red/node_modules/ibm-watson 7.7M ./pigpio-master 9.6M ./blynk-library/.git/objects 9.6M ./blynk-library/.git/objects/pack 9.8M ./blynk-library/.git 11M ./.config/chromium/Default/Extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm 11M ./.config/chromium/Default/Extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm/1.31.2_0 11M ./.config/chromium/Default/Local Extension Settings 11M ./.config/chromium/Default/Local Extension Settings/cjpalhdlnbpafiamejdnhcphjbkeiagm 13M ./blynk-library – Sally Manasrah Jan 11 '21 at 19:27
  • Hmm, that's not it. Looks like it's not your home directory. Can you try cd / then sudo du -h | sort -h? It will take some time to complete. – wyphan Jan 11 '21 at 19:29
  • du: cannot access './proc/2238/task/2238/fd/3': No such file or directory du: cannot access './proc/2238/task/2238/fdinfo/3': No such file or directory du: cannot access './proc/2238/fd/4': No such file or directory du: cannot access './proc/2238/fdinfo/4': No such file or directory – Sally Manasrah Jan 11 '21 at 19:30
  • That's not done yet, keep waiting. – wyphan Jan 11 '21 at 19:31
  • 259M ./lib/modules 315M ./usr/lib/arm-linux-gnueabihf 340M ./usr/lib/chromium-browser 348M ./lib 369M ./home 369M ./home/pi 528M ./usr/share 1.3G ./usr/lib 1.9G ./usr 11G ./var/log 12G ./var 14G . – Sally Manasrah Jan 11 '21 at 19:32
  • Ah, I see. So it's due to system logs. I'll edit my answer with the steps to remove that. – wyphan Jan 11 '21 at 19:33
  • ok , I am waiting .hope to solve :( – Sally Manasrah Jan 11 '21 at 19:33
  • can you please put the command I should use , to be more clear for me – Sally Manasrah Jan 11 '21 at 19:40
  • Do you use the full Raspberry Pi OS or the Lite version? The first one has GUI so you can simply navigate to that folder and start deleting files. For the latter (where there is no GUI): cd /var/log then sudo rm -v *.gz . Take note of which files show up most: that's the service you need to fix. – wyphan Jan 11 '21 at 19:42
  • Thanks a lot , You save my life :) :) – Sally Manasrah Jan 11 '21 at 19:44
  • No problem, and welcome to AskUbuntu btw! – wyphan Jan 11 '21 at 19:44