Announcement

Collapse
No announcement yet.

How to clean up system partition ?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mr_raider
    replied
    Originally posted by ronshor View Post
    And you are right. I'm interested in 16.04 for the the stability.
    I read about the KDEneon you recommended and it sounds interesting. When I have time to do a new install I'll consider this but I'm also considering Linux Mint KDE. What do you think will be better for me ?
    MInt KDE is EOL. 18.x is the last edition and going forward, 19.x will not have a KDE edition.

    I suspect you have a lot of stuff in root trash.

    try these commands:

    sudo -i

    ls /root/.local/share/Trash/

    Leave a comment:


  • ronshor
    replied
    Originally posted by oshunluvr View Post
    For comparision and discussion. here's my output of the du command;
    I noticed a couple things right away:
    Your /home is not separate.
    Your root user has A LOT of stuff in it's folder.
    Your /etc folder is huge in comparison, but not really large in a storage sense.

    Your total now of 37G minus 22G for home and minus the 3GB in root leaves 12GB for your install, which is smallish IMO. With only 10GB free (13GB if you clean out /root), you may not have enough to do an LTS-to-LTS upgrade. A lot has changed (everything really) in two years. Here's my advice:

    #1) If you have the capacity (another drive or partition), move your /home off of the installation partition. It will create a ton of room, makes backing up your personal data easier, and is safer for your data.
    #2) Consider a new install instead of the upgrade. This will ensure you have a "clean start" for your new OS and will remove all those left over configs and whatever else has been hanging around for half-a-decade. Frankly, if you still have configs effecting your software from 2012, you're not doing yourself any favors.
    #3) Wait until June and jump right to Kubuntu 18.04. Why start out two years behind? There have been a lot of improvements since 2016.
    #4) If you really want the 16.04 base for stability reasons, consider KDEneon instead of Kubuntu. You can't do a direct upgrade to it (new install only), but it's based on the same core as Kubuntu 16.04 but faster releases of new KDE/Plasma packages. The result is 2016 stability with 2018 freshness. The KDEneon team will eventually move to 18.04, but they aren't in a hurry so you may have an upgrade to 18.04 using KDEneon later in the summer.

    If you really can't or just won't follow any of the above advice, at least take a look at what is in /root. There really shouldn't be much in there except root level scripts or other custom items. The extra stuff in /etc is probably other left over configuration items from 12.04 and other programs you removed. Moving forward, I suggest using "purge" instead of "remove" when uninstalling packages. It'll keep things cleaner.
    I used Bleachbit and it cleaned up a few more GB, so now I have 15GB free.
    Is that going to be enough for an upgrade to 16.04?

    As for your other comments about my system :
    Something probably went wrong when I installed Ubuntu 12.04 years ago and my home folder was left on my system folder. Since there's now easy way to fix this (GUI...) I left it that way and it never bothered me. My other partition and other disk are on /media and I have control over them from the GUI.

    If you know of an easy way to move the Home folder than I'm open to hear about it.

    I moved to Kubuntu from Ubuntu and installed it from the terminal so I have both of them on my machine (not that I need or ever went back to Ubuntu ) so maybe that's the reason for the mess I have on my root user and /etc

    The reason I'm not that thrilled about doing a new install is beacause I don't have enough time now to download all my programs again and then configure them to my needs. I know that with Firefox I can save my profile but with other programs I will probably have to do a lot of work .
    Maybe I'll do it in the future when I have more time.

    And you are right. I'm interested in 16.04 for the the stability.
    I read about the KDEneon you recommended and it sounds interesting. When I have time to do a new install I'll consider this but I'm also considering Linux Mint KDE. What do you think will be better for me ?

    Leave a comment:


  • oshunluvr
    replied
    For comparision and discussion. here's my output of the du command;
    root@office:~# du -hx --max-depth=1 /
    18M /etc
    0 /media
    2.0G /var
    17M /bin
    139M /boot
    760M /lib
    12K /lib64
    0 /mnt
    3.0G /opt
    15M /root
    12M /sbin
    0 /srv
    125M /tmp
    13G /usr
    0 /cdrom
    4.0M /lib32
    18G /
    I noticed a couple things right away:
    Your /home is not separate.
    Your root user has A LOT of stuff in it's folder.
    Your /etc folder is huge in comparison, but not really large in a storage sense.

    Your total now of 37G minus 22G for home and minus the 3GB in root leaves 12GB for your install, which is smallish IMO. With only 10GB free (13GB if you clean out /root), you may not have enough to do an LTS-to-LTS upgrade. A lot has changed (everything really) in two years. Here's my advice:

    #1) If you have the capacity (another drive or partition), move your /home off of the installation partition. It will create a ton of room, makes backing up your personal data easier, and is safer for your data.
    #2) Consider a new install instead of the upgrade. This will ensure you have a "clean start" for your new OS and will remove all those left over configs and whatever else has been hanging around for half-a-decade. Frankly, if you still have configs effecting your software from 2012, you're not doing yourself any favors.
    #3) Wait until June and jump right to Kubuntu 18.04. Why start out two years behind? There have been a lot of improvements since 2016.
    #4) If you really want the 16.04 base for stability reasons, consider KDEneon instead of Kubuntu. You can't do a direct upgrade to it (new install only), but it's based on the same core as Kubuntu 16.04 but faster releases of new KDE/Plasma packages. The result is 2016 stability with 2018 freshness. The KDEneon team will eventually move to 18.04, but they aren't in a hurry so you may have an upgrade to 18.04 using KDEneon later in the summer.

    If you really can't or just won't follow any of the above advice, at least take a look at what is in /root. There really shouldn't be much in there except root level scripts or other custom items. The extra stuff in /etc is probably other left over configuration items from 12.04 and other programs you removed. Moving forward, I suggest using "purge" instead of "remove" when uninstalling packages. It'll keep things cleaner.

    Leave a comment:


  • ronshor
    replied
    Originally posted by chimak111 View Post
    sudo du -hx --max-depth=1 / may take some time to complete, so don't panic
    Good advice !!!

    Leave a comment:


  • ronshor
    replied
    Originally posted by oshunluvr View Post
    That's only three kernels, so nothing there is kill a lot of space. Although, I can't imagine why 3.5 is on there (2012 kernel) and you are not updated to the current kernel for 14.04 (3.16), but that's a different issue. I guess you upgraded this install from 12.04 to 14.04? /[/B]
    Yes. I did upgrade from 12.04 to 14.04 and now after the clean up I'm gonna upgrade to 16.04.

    Code:
    ron@ron-Vostro-270:~$ sudo du -hx --max-depth=1 /
    [sudo] password for ron: 
    692M    /lib
    12K     /media
    4.0K    /mnt
    12M     /sbin
    268M    /opt
    9.6M    /bin
    8.0K    /.config
    115M    /boot
    3.2G    /root
    80K     /tmp
    16K     /lost+found
    8.4G    /usr
    1.8G    /var
    4.0K    /cdrom
    4.0K    /srv
    181M    /etc
    4.0K    /lib64
    22G     /home
    37G     /
    ron@ron-Vostro-270:~$
    I'm posting the ls /boot again because it looked like a mess the first time

    Code:
    ron@ron-Vostro-270:~$ ls /boot
    abi-3.13.0-135-generic     config-3.5.0-54-generic        memtest86+.bin                 System.map-3.5.0-54-generic
    abi-3.13.0-137-generic     grub                           memtest86+.elf                 vmlinuz-3.13.0-135-generic
    abi-3.5.0-54-generic       initrd.img-3.13.0-135-generic  memtest86+_multiboot.bin       vmlinuz-3.13.0-137-generic
    config-3.13.0-135-generic  initrd.img-3.13.0-137-generic  System.map-3.13.0-135-generic  vmlinuz-3.5.0-54-generic
    config-3.13.0-137-generic  initrd.img-3.5.0-54-generic    System.map-3.13.0-137-generic
    ron@ron-Vostro-270:~$
    Last edited by ronshor; Jan 08, 2018, 11:40 AM.

    Leave a comment:


  • chimak111
    replied
    If you're going to use bleachbit, make very sure you know what you've selected for cleaning.

    sudo apt-get autoclean will only remove files from /var/cache/apt/archives for applications that are no longer present on your system.

    sudo apt-get clean is more effective in recovering space. It will remove all files from /var/cache/apt/archives except a "lock" file which is small and shouldn't be removed in any case.

    As for kernels, I wouldn't bother at this time. As mentioned, the oldest is probably a hangover from when you upgraded to 14.04.

    Running sudo apt-get autoremove when prompted should normally keep your kernels in control. If you have doubts about what the command is suggesting should be removed, post the contents here for people to guide you.

    sudo du -hx --max-depth=1 / may take some time to complete, so don't panic
    Last edited by chimak111; Jan 08, 2018, 07:39 AM.

    Leave a comment:


  • oshunluvr
    replied
    That's only three kernels, so nothing there is kill a lot of space. Although, I can't imagine why 3.5 is on there (2012 kernel) and you are not updated to the current kernel for 14.04 (3.16), but that's a different issue. I guess you upgraded this install from 12.04 to 14.04? That would explain the 3.5 kernel. I doubt it's bootable so you could remove that one;

    sudo apt purge 3.5.0-54

    should dump that kernel and it's associated files.

    Let's get a better look at your system as a whole. Do this command and post the results;

    sudo du -hx --max-depth=1 /

    Leave a comment:


  • ronshor
    replied
    I tried the clean commands and it cleaned up 7GB.
    Now the ls/boot for the old kernels gives me this

    ron@ron-Vostro-270:~$ ls /boot
    abi-3.13.0-135-generic config-3.5.0-54-generic memtest86+.bin System.map-3.5.0-54-generic
    abi-3.13.0-137-generic grub memtest86+.elf vmlinuz-3.13.0-135-generic
    abi-3.5.0-54-generic initrd.img-3.13.0-135-generic memtest86+_multiboot.bin vmlinuz-3.13.0-137-generic
    config-3.13.0-135-generic initrd.img-3.13.0-137-generic System.map-3.13.0-135-generic vmlinuz-3.5.0-54-generic
    config-3.13.0-137-generic initrd.img-3.5.0-54-generic System.map-3.13.0-137-generic
    ron@ron-Vostro-270:~$
    Before I try the Bleachbit. Can someone instruct me what I should do with the old kernels ?

    Leave a comment:


  • Snowhog
    replied
    Originally posted by ronshor View Post
    The size of my system partition is 48GB.
    46GB are in use !!
    I have know idea how it got to that level.
    The most common way that this happens, is not doing housecleaning on your system. By that, I mean opening a konsole and runing:
    Code:
    sudo apt-get clean && sudo apt-get autoclean && sudo apt-get autoremove
    You can learn what each of these do by, again, in a konsole, typing: man apt-get and reviewing what clean, autoclean, and autoremove do.

    Leave a comment:


  • oshunluvr
    replied
    Start with removing all kernels except the one you're using and one older (for backup) and all associated files (headers, etc.). This is the most common source of excess. Open a terminal and type ls /boot to see how many you have installed.

    Leave a comment:


  • Qqmike
    replied
    I have used the package called Bleachbit (you can get it through Muon, for example--it is in the repositories). You can have Bleachbit run clean, autoremove, and autoclean. And/or, you could run those last 3 commands at Konsole, too. (I think one of them may be redundant, maybe clean, not sure). I think Snowhog is on top of some of this, too, and he may see your post. Just a basic caveat: Using Bleachbit or ANY clean-up package could result in unexpected changes to your system! I have not had any problems yet, though.

    Leave a comment:


  • ronshor
    started a topic How to clean up system partition ?

    How to clean up system partition ?

    The size of my system partition is 48GB.
    46GB are in use !!
    I have know idea how it got to that level.
    I have two users (one for guests that has virtual machine on it that takes 7GB)

    Now, before upgrading to 16.04 I want to clean up unnecessary files without erasing my firefox and chrome cache and history (which I don't believe takes that much space anyway)

    Does anybody know how to do it and why there isn't any system tool to take care of that ?
Working...
X