UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
since last week I receive automatical warnings, that I have only 350-400 MB free on my file system (/root is 8 GB large). How can I clean some space? To be honest, I didn't expect that - more or less - standard installation of Ubuntu will consume all 8 GB of the space. I have nothing special installed...
I have run a few distro's from an 8G usb flash drive. I'd say that 8G is the minimum for a bloated (if you prefer feature rich) distro such as Ubuntu.
If you didn't watch the install process you could get some loss you didn't expect. Maybe you made several partitions that are eating up space. Maybe you have many apps installed by default that you can remove.
I tend to use a single partition for small installs and the systems I use them on don't require swap so I don't even create one. Tools like disk partition viewing may help as well as the package management to see what is installed.
8gb is TINY, I would seriously consider resizing the partition. (I personally use 20gb for my Debian / partition).
That being said, there are ways to free up a bit of space. For example you can clear apt's "cache" of downloaded packages with:
Code:
sudo apt-get clean
Also check /var/log for bloated log files you don't need, remove old kernel updates, etc. Ubuntu includes (or used to include, anyway--if it doesn't anymore, you can install it with Software Center) a disk usage analyzer called baobab that may be helpful to you.
Really though, storage is incredibly cheap in 2013 (1TB drives for $79) so just make it bigger and then you don't have to worry about a few mb here and there.
If you have run a few updates, you may have several sets of kernels (old kernels will not be deleted when you install a new one). Take a look with the command:
dpkg -l linux-image*
and
dpkg -l linux-headers*
remove the older versions. A kernel version, together with headers, takes about 220M space.
Note: in order to delete headers, you first have to delete the corresponding *xx-generic, and afterwards the headers itself (ideas how to do it better welcome).
^--- good advice about removing old kernels, BUT in my opinion you should keep at least 1 spare kernel in addition to your current one, so that you have a fallback in case you need to troubleshoot.
thanks for all hints. I have indeed several kernels, which I installed over standard update process.
Genral question of partition size: my hard drive is 80 GB, so I tried to partition it more or less fair, so that I could run both OSs (+ some shared drive) without any issues. And the value of 8 GB is based on my previous experience with Debian (which I had before). I never had less than 3 GB free space on Debian. So I thought that 8 GB would be an appropriate size.
I will apply all your hints and check, how much space I rescue.
Greetings from Hamburg,
Andrey.
Quote:
Originally Posted by SuSE_Lamer
Hello @all,
since last week I receive automatical warnings, that I have only 350-400 MB free on my file system (/root is 8 GB large). How can I clean some space? To be honest, I didn't expect that - more or less - standard installation of Ubuntu will consume all 8 GB of the space. I have nothing special installed...
Ubuntu 12.04 (my work server) has 6.2G on / as well (the same as 11.10 on laptop). Standard DE + latex + R + various this kind of stuff.
My bet is that 10G is sufficient, unless you like to install some sort of enormous software. What are your "both OS-s"? Ubuntu + XP? I cannot comment on XP. Say, you leave 40G for Ubuntu. I would partition it like that:
* 10G /
* 4G swap (2x the size of RAM)
(* eventually another 10G for another / you can use when upgrading)
* rest for /home
If you have two / partitions (obviously, only one of them mounted at time), you can easily install two distros, use them both while sharing $HOME, and at a later point of time decide which one to keep. (Sharing $HOME may create issues though). If you feel reasonably certain not to need space for this kind of experiments, just do one / partition. You can do a lot of testing in virtual machine anyway, or you take some risk and just install the new version. If you want to learn, quite another level of solution is LVM.
Genral question of partition size: my hard drive is 80 GB, so I tried to partition it more or less fair, so that I could run both OSs (+ some shared drive) without any issues. And the value of 8 GB is based on my previous experience with Debian (which I had before).
What other OS are you running along with Ubuntu?
Do you have a lot of games installed? Many games can be quite large these days?
Do you have more than one desktop environment installed? For example, do you have both Unity and KDE? Adding the Kubuntu Desktop to Unity on Ubuntu would add a lot of bloat.
As snowpine mentioned, be sure to check how much space the log files in /var/log/ are taking up. For some reason Ubuntu seems to accumulate log files much faster than Slackware in my experience. It is safe to remove all the log files from /var/log; but leave the directories in /var/log alone because you need them.
With an 80GB hard drive, I would go with 10GB for the root partition. My Lubuntu 12.10 root partition is 20GB in size and it only has about 4GB full. I don't have a whole lot of extra software beyond what is standard on Lubuntu though.
What other OS are you running along with Ubuntu?
Do you have a lot of games installed? Many games can be quite large these days?
Do you have more than one desktop environment installed? For example, do you have both Unity and KDE? Adding the Kubuntu Desktop to Unity on Ubuntu would add a lot of bloat.
As snowpine mentioned, be sure to check how much space the log files in /var/log/ are taking up. For some reason Ubuntu seems to accumulate log files much faster than Slackware in my experience. It is safe to remove all the log files from /var/log; but leave the directories in /var/log alone because you need them.
With an 80GB hard drive, I would go with 10GB for the root partition. My Lubuntu 12.10 root partition is 20GB in size and it only has about 4GB full. I don't have a whole lot of extra software beyond what is standard on Lubuntu though.
Hello @all,,
I have also WinXP Pro installed. Why?
No games.
Under Linux I have Unity and GNOME as desktop environments. As fasr as I understand, I cannot remove Unity in Ubuntu.
Actually, I could rescue some MBs by deleting apt cache. I also noticed, that I have several kernels installed. Here I have a question: how should I remove kernels properly? What is a right sequence? Is it possible to delete them using "Ubuntu Software Center"?
I was wondering if you had any other Linux distros installed that were sharing space (such as a common home directory) with Ubuntu.
Quote:
Originally Posted by SuSE_Lamer
Actually, I could rescue some MBs by deleting apt cache. I also noticed, that I have several kernels installed. Here I have a question: how should I remove kernels properly? What is a right sequence? Is it possible to delete them using "Ubuntu Software Center"?
Run the dpkg commands that otoomet discussed in post #4 in this thread. The you can remove them either from Synaptic Package Manager, or the Software Center if you prefer that, or from the terminal using apt-get like this:
where XXX is the name of the kernel and headers packages. Obviously, the newest kernel needs to be left in place. It would also be a good idea to leave the most recent kernel prior to the current one installed as a back up in case you could not boot the current kernel for some reason.
... I would use "purge" instead of "remove". This also removes the configuration files (you do not need to keep the configuration information of deleted kernels anyway...).
I have never succeeded in removing just linux-headers-XXX. I always have to remove separately linux-headers-XXX-generic and thereafter linux-headers-XXX. You can probably put them on the same command line, something like
(you may replace aptitude with apt-get if you prefer). I also find it easier to delete the packages one-by-one, pressing arrow-up on keyboard and changing the command just little bit when doing that.
I will try to use sofware center next time, so I can tell you how to do that as well ;-)
I think this is something we should make automatic. Something like a button "clean old kernels" in software center, or like that.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Quote:
Originally Posted by SuSE_Lamer
Hello @all,
thanks for all hints. I purged old kernels, cleaned APT cache. Now I can work further...
Short question about "bleachbit". I started it, but I was a bit scared by the amount of options... Should I be carefull there?
Greetings,
Andrey
Yes you should.
Third party apps to do a job you could do is a habit encouraged by MS usage. There are many tools for individual jobs available in Linux.
Having a automated program make choices as to what you need on your install and don't need is simply lazy foolishness.
If you are using a stable version aptitude, apt-get and synaptic will all let you know if there are some packages that are no longer needed when you do most operations in them.
Ubuntu also puts all of your backgrounds in /usr/share/backgrounds. If you have trashed any of them or anything else in the system files this is still in there in /root/.local/trash or perhaps just /root/.trash. If so you may want to empty that, it is not part of the trash you use in user land.
Distribution: Mint 20.3 MATE, Android, Windows 10, MX Linux and Mint 21.1 MATE
Posts: 1,052
Rep:
Crossing over from windows and eraser, I would say you need make back up just in case you need reconfigure. I found eraser would overwrite old internet history with zeros and clear space for re-use, only once in Vista, things were slightly damaged.
I would overwrite all free, deleted space on drive c with zeros, and it would get rid of spyware and viruses and cookies.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.