-11

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.

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.