Reclaim disk space

Clear the cache

An easy way to reclaim a sizeable amount of disk space is to clear the cache in a user’s home directory.

  1. Launch a terminal window

  2. Run the following command:

    $ rm -rf ~/.cache/*
    

Limit the maximum capacity of the system journal

If left at default values and not checked for a long time, the system journal logs can eventually consume multiple Gigabytes of data. To set the maximum allowable size of the system journal logs 1:

  1. Launch a terminal window

  2. As root (or using sudo), modify the /etc/systemd/journald.conf file

    1. Locate the following line:

      #SystemMaxUse=
      
    2. Uncomment the line by removing the preceding # character

    3. Set a max threshhold in MB (M), GB (G), etc. For example, a 512 MB max capacity is represented as:

      SystemMaxUse=512M
      
    4. Save the file

  3. Restart the journald service:

    $ sudo systemctl restart systemd-journald.service
    
1

Source