Link to home
Start Free TrialLog in
Avatar of tonelm54

asked on

Ubuntu small install

Im trying to make a few instances of ubuntu server on my hypervisor and according to documentation the final size should be around 5Gb for a minimum install, however mine are always around 15Gb. Im just downloading Ubuntu server from the ubuntu website, and accepting all default options, which from my understanding should install with the minimal options so why soo big???

Any suggestions what Im doing wrong, or how to reduce my final image size?

Thanks in advance
Avatar of gelonida
Flag of France image

According to which source do you expect a minimal installation to have a size of 5Gb?

Which exact version of Ubuntu server do you talk about?

This might help finding the answer.

Also: Which language(s) do you install?

Installing any language other than US English might add a few Megabytes, though I don't think this can explain the 10 Gb difference, that you encounter

In fact the documentation even mentions, that 2.5 Gb are the minimal disque requirement, but I didn't find any steps of how to achieve this minimal setup
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your final install will depend on software packages you install.

1) For example, an initial Ubuntu install might weight in at 2G.

2) Then once you install a full LAMP Stack - Apache + MariaDB + PHP - your install footprint will grow greatly.

3) Then once you start up all these daemons they'll start logging data to /var/log/* files.

4) So after #3 runs for a few minutes, even without traffic, you'll likely be past your 5G target, which will grow rapidly as you have traffic + add database data.

5) You can debug this using the following command...

# for dir in /* ; do du -hs $dir 2>/dev/null ; done
0	/bin
4.0K	/boot
43M	/david-favor
4.0K	/dev
7.0M	/etc
20K	/home
0	/lib
0	/lib32
0	/lib64
0	/libx32
4.0K	/media
4.0K	/mnt
4.0K	/opt
4.0K	/proc
914M	/root
180K	/run
21M	/runtime
0	/sbin
5.8M	/services
4.0K	/sites
919M	/snap
4.0K	/srv
0	/sys
4.0K	/tmp
2.1G	/usr
4.5G	/var

Open in new window

This is an LXD template I use for installing Ubuntu Focal across LXD containers.

Not the big data users...

/snap - Used by various packaging, deinstall packages to reduce size.

/usr - Same as /snap, deinstall packages.

/var - Contains data files for MariaDB + package caches + log files, which are very difficult to reduce.

So start by finding out your size hogs, then make a determination if/how to reduce system footprint.