0

Originally I wanted to upgrade from 16.04 to 18.04. After launching the upgrade installer which appeared after I boot the Ubuntu, I got the message that I should upgrade snapd first (whatever is is).

I tried snap refresh. The message is All snaps up to date.. The I tried to upgrade following the scenario described here. After the command apt upgrade, there is the following message in terminal: After this operation, 611 MB of additional disk space will be used.

How do I get more free space there?

I'm using Ubuntu alongside with Windows10 and originally I just wanted to try it a little bit so I reserved only 14,1 Gb for my system. So I was considering to expand it anyway.

Which option would you recommend me:

  1. do something to free up /var/cache/apt/archives/.
  2. continue upgrade without doing it.
  3. expand my ubuntu partition first (how?)
  4. uninstall 16.04 and install 18.04 from scratch ? Thank you in advance.

You don't have enough free space in /var/cache/apt/archives/

  • The recommended installation size is 25gb so you have space for release-upgrades, and adding software. Yes you could sudo apt autoremove; sudo apt autoclean to try and free some space, but I'd not recommend release-upgrading until you have a few gb of free space unless you're happy to risk a failed upgrade (due to lack of space). I would expand your disk-space (boot a live system, and expand it using gparted with spare space next to it; creating the space is the main issue I usually have). – guiverc Mar 17 at 8:23
  • 14Gb is quite enough for Ubuntu root filesystem. you may just have to free some space – cmak.fr Mar 17 at 8:44
  • @guiverc what you mean by "boot a live system"? – alex511ZU Mar 24 at 19:49
  • I removed one software, now I have 4.3 GB free space. I suppose it is enough for an upgrade? Maybe it is better to expand the space when I am already on the 18.04 version (?) – alex511ZU Mar 24 at 20:02
  • Booting a 'live' system means booting a system that will run from memory only (ie. not using your installed OS on sdd/hdd). Most Ubuntu install media provides this option via 'try ubuntu' allowing you to boot and use it without install. The space required varies on how much software you've added (as you need space for old + download.compressed + expanded then installed .. Yes loads of people use less than the 25gb, which isn't a problem if you don't see something that looks interesting & thus install it.. bloating your system. 4.3 should be enough for a 'leanish' system. – guiverc Mar 24 at 21:40
0

Here is how to get more free space on updated Ubuntu


Display filesystem size and space used

df -Th | grep -v fs

You can free some space with those steps

# 1 # Remove unused packages
sudo apt-get update
sudo apt-get -y autoremove
sudo apt-get -f install

# 2 # Clean apt downloads
sudo apt-get clean

# 3 # Remove old snap packages
LANG=en_GB.UTF-8
snap list --all | while read snapname ver rev trk pub notes; do if [[ $notes = *disabled* ]]; then sudo snap remove "$snapname" --revision="$rev"; fi; done

# 4 # Delete old logs
sudo /etc/cron.daily/logrotate
sudo find /var/log -type f -iname *.gz -delete

Then display again filesystem size and space used

df -Th | grep -v fs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.