0

I am upgrading from Ubuntu 14.04 to 16.04. When I tried to upgrade it threw errors about not enough memory space. After searching on the web I found out deleting old kernel helps.

I deleted old kernel, and was successful in freeing up space. However, the upgrade still needs more space (more than 3 GB). How can more space be made available?. My partition is of 19GB

Zanna
  • 70,465
Sushodhan
  • 101
  • You haven't said if you're using a desktop or server, but if a server (the recommended minimum is 25GB) I'd suggest increase disk allocation; as upgrades are part of why it's a recommended minimum of 25gb (https://help.ubuntu.com/community/Installation/SystemRequirements) Removing software is the next step, but we've been given limited detail, and don't know what machine is used for so we cannot really say. – guiverc Jul 18 '20 at 07:09
  • @guiverc I am using a desktop. How can I increase the disk allocation. – Sushodhan Jul 18 '20 at 07:11
  • @User24601 No it is different question. – Sushodhan Jul 18 '20 at 07:12
  • Refer https://askubuntu.com/questions/126153/how-to-resize-partitions – guiverc Jul 18 '20 at 07:15
  • Please write the complete message what the error or notification says – JoKeR Jul 18 '20 at 08:18

1 Answers1

2

I have been through this with a 15 GB partition, that means, the upgrade proceeded, but a disk space warning came. It mostly succeeded but I needed some technical experience to repair the booting.

Temporarily freeing as much space as possible on the old system is the message here. I am just providing some general ideas below.

19GB is quite a lot for a system partition (especially a 14.04), so if you managed to filled it may point to you not having a separate partition for home.

  • So first, if /home is on the system partition, will be to move all user data away and make sure the back-up of your user data is up to date. You will put these back after the upgrade. Hidden user configuration data mostly could remain as that not take very much space, with the exception of .thunderbird and the configuration data of the browser, that may contain several MB of cache.
  • Clear the cache of stored installation files, make your package database up to date and remove unused dependencies: sudo apt-get update && sudo apt-get clean && sudo apt-get autoclean && sudo apt-get autoremove. These will be downloaded and installed again when needed, but mostly, you will be downloading updated versions anyway.
  • Then indeed, remove all old kernels: these require more than 300 MB each.
  • Bring the size of log files down. Other log files can be removes with sudo rm -v /var/log/*log*. With a near full drive, you may be having megabytes of log files.
  • Temporarily remove user applications (LibreOffice, Gimp, Thunderbird, extra browsers you installed, ...). These are easily reinstalled on the updated system.
  • Again remove dependencies that are not anymore in use after having removed applications: sudo apt-get autoremove

Check your progress with df -h /

This would allow you to gain several GB of free space, enough for an upgrade.

vanadium
  • 88,010