-10

Can you give EXACT terminal commands that work WITHOUT regurgitive mere basics that don't work such as Sudo Apt-get clean/autoclean. Is it Wily defect or what? I got Linux to be simple not to become a hacker for my own PC.

  • What are you trying to do ? – Sergiy Kolodyazhnyy Apr 16 '16 at 23:17
  • Need to clean up space. none of the terminal commands work meanwhile PC won't upgrade but tries too "Try sudo apt-get clean". I can see my hard drive free space growing smaller even after I trash delete downloads and follow-up with "autoclean" I think it doesn't clean deep enough into my PC in reality. Now Ubuntu Software System won't down load packages either and "Bleachbit Cleaner" package doesn't exist recomended from other thread. but doesn't have enough space anyway IDK if half install related or same problem as always... latest versions of Ubuntu never fully tested beforehand. – Andrew D Ford Apr 17 '16 at 00:17
  • @serg for Example after install a defrag program and previous others lately getting these error meassages... gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-4.2.0-34-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-4.2.0-34-generic (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Errors were encountered while processing: – Andrew D Ford Apr 17 '16 at 00:31
  • @wjandrea No, I'm not talking about speed I'm talking about overall files being purged and gone...CCclean doesn't purge deeply either. – Andrew D Ford Apr 17 '16 at 00:46
  • Yes, I should have mentioned the title of that question is incorrect. The poster was actually asking about cleaning storage, not memory. – wjandrea Apr 17 '16 at 00:48
  • I'm talking about overall files being purged and gone Which files? I got Linux to be simple not to become a hacker for my own PC Linux isn't Mac OS X. – Elliott Frisch Apr 17 '16 at 00:52
  • I'm talking about files no one needs in general. Naming the specific file would mean I already know the exact problem wouldn't it? I like everybody else needs to turn a PC from error messages everywhere that needs disk space to a PC that works like I just installed from image disk. Currently, The speed is fast as ever that's not the problem. Obviously parts of my PC are not working in tandum some how. ANY SUGGESTIONS? – Andrew D Ford Apr 17 '16 at 00:53
  • This sound like an XY Problem. Can you please describe the actual problem(s) that you're experiencing in more detail? How does the lack of drive space manifest? – David Foerster Apr 18 '16 at 15:28

1 Answers1

2

The commands apt-get clean and autoclean are not primarily meant to free disk space. These commands are meant to work on the software packages that are installed on your computer.

  • Now, if you want to know what did fill up your harddrive start with the command sudo df -m. This will tell you on which partition and in which directory the most disk space is used in MB.

    # sudo df -m
    S.Ficheros                    bloques de 1M Usados Disponibles Uso% Montado en
    /dev/dm-0                            366198  91120      275078  25% /
    udev                                     10      0          10   0% /dev
    tmpfs                                   766      9         757   2% /run
    tmpfs                                  1915      1        1915   1% /dev/shm
    tmpfs                                     5      1           5   1% /run/lock
    tmpfs                                  1915      0        1915   0% /sys/fs/cgroup
    /dev/sda1                               228     47         169  22% /boot
    /dev/mapper/laptop--user1-home        102350  13286       89065  13% /home
    tmpfs                                   383      1         383   1% /run/user/1000
    
  • Use the command sudo du -m --max-depth=2 within one Directory to find out which subdirectories have the biggest size in MB. This will take you to the Directory that filled up your hard disk.
    like: sudo du -m --max-depth=2 /home.
    Which will tell you which Directory of the User Account hold the most disk space in MB.

    # sudo du -m --max-depth=1 /home
    12425   /home/user1
    817     /home/user2
    13242   /home
    

    Here we see that 'user1' is using the most of the 13242 MB occupied on the /home partition

  • Once you have found out what did fill up your hard disk you will be able to decide best what is to do to free disk space. Like perhaps: Deleting user files or uninstalling software.

  • Thank you @Bodo Hugo Barwich that is the best and only help I've gotten so far. Now all I have to do is delete which ever file in it's location files I don't want to trash; there is no residual left after that that I have to deep clean? – Andrew D Ford Apr 18 '16 at 02:21
  • And how do I delete files without uninstalling software that runs linux itself not doing harm? – Andrew D Ford Jul 26 '16 at 00:56
  • Unpacking dpkg: error processing archive cannot copy extracted data for './boot/vmlinuz-4.2.0-42-generic' to '/boot/vmlinuz-4.2.0-42-generic.dpkg-new': failed to write (No space left on device) No apport report written because the error message indicates a disk full error killed by signal Unpacking dpkg: error processing archive cannot copy extracted data for './boot/vmlinuz-4.2.0-38-generic' to '/boot/vmlinuz -4.2.0-38-generic.dpkg-new': failed to write (No space left on device) No apport report error message indicates dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) – Andrew D Ford Jul 26 '16 at 01:16
  • Hi @AndrewDFord the Package vmlinuz-4.2.0-42-generic is part of a Kernel Package of the Operating System. These Package usually reside in the /boot Partition. You should not delete there Files manually Rather check with df -m whether your /boot Partition has enough Space assigned to do Kernel Upgrades. The /boot Partition should have at least 500MB assigned to be able to conformable upgrade your Operating System Kernel. If your /boot Partition is too small you will need to repartion your System. – Bodo Hugo Barwich Mar 17 '17 at 10:40