Free and Clean Up Hard Disc Space in Your Ubuntu System

My lappy seemed overly sluggish. Upon checking the disk space (shown below), some clean up or packages removal was seriously needed.
$ df -h
Filesystem   Size  Used Avail Use% Mounted on
/dev/sda5     232G  211G  9.8G  96% /

1. Clean the downloaded debian package files.
$ sudo apt-get clean

2. Using deborphan to remove unused orphaned packages.
$ sudo apt-get remove --purge $(deborphan)

3. Clear Google Chrome cache files.
$ cd ~/.cache/google-chrome
$ du -h .
32M     ./Default/Media Cache
274M    ./Default/Cache
305M    ./Default
305M    .

$ rm -rf Cache/* Media\ Cache/*

4. Remove unused packages using software-center, unfortunately, there was some issue with SSO authentication. Fixed it by reinstalling oauthlib package.
$ sudo pip install --upgrade oauthlib
$ sudo software-center

No comments:

Post a Comment