تقييم الموضوع:
  • 0 صوت - 0 بمعدل
  • 1
  • 2
  • 3
  • 4
  • 5
How to Free Up Space From sda1 on Linux
#1
Solution
After trying many different methods that may work for you, such as running the commands 
كود:
sudo apt autoremove
 or 
كود:
sudo apt autoclean
 , the solution is:
Run 
كود:
du -hs * | sort -h
 and the terminal will output all the directories and files of your current directory in ascending order so that you can see which files or directories are taking so much storage. The output will look like this:
[صورة: 1*lB-nmhCEUFD-w5OmwLhA1A.png]
Now you can see which files or directories are taking much space and delete them using 
كود:
rm -rf filename
 or 
كود:
rm -rf directory_name
 . I did it and after running 
كود:
df -h
 again, I now had 88% — instead of 100% — of memory used from the 
كود:
dev/sda1
 directory. Even though I had deleted many files and directories, it seemed strange to me that something was still occupying so much space. And here comes a powerful tool that solved my problems and of which I knew nothing before running into this issue.
NCDU
NCDU shows you which files and directories are taking the most space on the directory you run it — but it shows even the hidden files and directories that the other commands we used so far are unable to show. I did show you the other commands though because finding the big files and deleting them manually helped me to get some space — even if it was only a bit — so that I could install 
كود:
ncdu
 by running the command 
كود:
sudo apt-get install ncdu
 . Now, running the command 
كود:
ncdu path
 will show you what you need to find out — path being the directory you want to inspect, which on my case path was equal to 
كود:
/home/myusername
 . You will see something like this:
[صورة: 1*xeepCgVgiq7in2L8V3cYfg.png]
Here we go! After I solved the issue, you can see that anaconda3 takes up the most space, but before solving the issue, 
كود:
.local
 took about 4GiB of my memory — that is a lot. Also, 
كود:
.cache
 was a big part of the problem.
You now only need to remove the biggest files in these directories. I do not recommend removing all of the content inside them at once, but there are different opinions about it over the internet. But make some research so that you will not be doing something damageable for your computer. So, now, just run 
كود:
cd .cache
 and run 
كود:
du -hs * | sort -h
 to find which applications’ caches are unnecessarily big. Then, run 
كود:
rm -rf filename
 where the filename will be the name of the file you want to remove. Also, if 
كود:
.local
 is taking much space too, run 
كود:
rm -rf ~/.local/share/Trash
 to remove all the trash that has been saved — if you don't care about them, of course. If the 
كود:
.thumbs/
 file is also taking much space, run 
كود:
rm -rf ~/.thumbs/*
 .
After doing all of this and removing the anaconda files I had before and trying running its installer again, the installation succeed, and now I can use it without any problems.
Credits to this helpful article on NCDU that was a light for me:
الرد


الانتقال السريع للمنتدى:


يتصفح هذا الموضوع من الأعضاء الان: بالاضافة الى ( 1 ) زائر