SOPHGO算能科技BM1684盒子占用空间满的问题解决

目录

[1 问题由来](#1 问题由来)

[2 问题排查与解决](#2 问题排查与解决)


1 问题由来

安装软件的时候发现,软件根本安装不上了,用df -h看到根目录已经满了

bash 复制代码
root@bm1684:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay         5.8G  5.7G     0 100% /
devtmpfs        2.8G     0  2.8G   0% /dev
tmpfs           2.8G     0  2.8G   0% /dev/shm
tmpfs           568M   59M  509M  11% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.8G     0  2.8G   0% /sys/fs/cgroup
/dev/mmcblk0p1  128M   92M   37M  72% /boot
/dev/mmcblk0p7   16G  8.4G  6.3G  58% /data
/dev/mmcblk0p4  2.4G  2.2G  150M  94% /media/root-ro
/dev/mmcblk0p5  5.8G  5.7G     0 100% /media/root-rw
/dev/mmcblk0p6  2.0G  158M  1.7G   9% /opt
/dev/mmcblk0p2  2.9G   53M  2.8G   2% /recovery
tmpfs           568M     0  568M   0% /run/user/0

2 问题排查与解决

bash 复制代码
sudo du -h / --max-depth=1

使用这个命令看到,root目录有点大,

然后进去看看

bash 复制代码
root@bm1684:/# cd /root
root@bm1684:~# du -sh
5.2G	.
root@bm1684:~# ll
total 84
drwx------ 1 root  root   4096 Aug  6 16:15 ./
drwxr-xr-x 1 root  root   4096 Jul 31 14:29 ../
-rw------- 1 root  root    156 Aug  6 16:15 .Xauthority
-rw------- 1 root  root   8640 Aug  5 09:06 .bash_history
-rw-rw-r-- 1 admin admin  3222 Aug 10  2023 .bashrc
drwxr-xr-x 2 root  root   4096 Jul 31 14:29 .boot/
drwxr-xr-x 1 root  root   4096 Jul 31 11:18 .cache/
drwx------ 3 root  root   4096 Jul 30 16:47 .config/
drwxr-xr-x 3 root  root   4096 Jul 31 10:32 .local/
-rw-r--r-- 1 root  root    161 Dec  5  2019 .profile
drwx------ 2 root  root   4096 Aug  4 09:49 .ssh/
-rw------- 1 root  root  12361 Aug  1 16:37 .viminfo
drwxr-xr-x 5 root  root   4096 Aug  5 09:37 .vscode-server/
drwxrwxr-x 1 admin admin  4096 Apr  2  2020 post_install/
root@bm1684:~# du -sh ./*
444K	./post_install

因为里面有些文件是隐藏的,所以用这个命令可以看到占用

bash 复制代码
root@bm1684:~# du -sh .[!.]* *
4.0K	.Xauthority
12K	.bash_history
4.0K	.bashrc
24K	.boot
4.7G	.cache
8.0K	.config
32K	.local
4.0K	.profile
8.0K	.ssh
16K	.viminfo
443M	.vscode-server
444K	post_install
root@bm1684:~# du -sh .[!.]* 
4.0K	.Xauthority
12K	.bash_history
4.0K	.bashrc
24K	.boot
4.7G	.cache
8.0K	.config
32K	.local
4.0K	.profile
8.0K	.ssh
16K	.viminfo
443M	.vscode-server

可以看到是cache的问题,直接

bash 复制代码
rm -rf ~/.cache/*
相关推荐
我是哈哈hh19 小时前
【MySQL】在UBuntu环境安装以及免密码登录入门
linux·数据库·mysql·ubuntu
clever1012 天前
在ubuntu系统上离线安装jenkins的做法
ubuntu·servlet·jenkins
Nie_Xun2 天前
ubuntu网络共享
linux·运维·ubuntu
wuicer3 天前
ubuntu 20.04 安装anaconda以及安装spyder
linux·运维·ubuntu
shuangrenlong3 天前
ubuntu更新chrome版本
linux·chrome·ubuntu
基于python的毕设3 天前
C语言栈的实现
linux·c语言·ubuntu
穷人小水滴3 天前
在 windows 运行 flatpak 应用 (WSL)
linux·windows·ubuntu
mit6.8243 天前
ubuntu远程桌面很卡怎么解决?
linux·ubuntu·php
morliz子轩4 天前
基于WSL搭建Ubuntu 22.04.x LTS开发环境
linux·运维·ubuntu
路多辛4 天前
Debian新一代的APT软件源配置文件格式DEB822详解
linux·运维·ubuntu·debian