I am trying to upgrade from Fedora 25 to Fedora 27. I followed the instruction from the magazine, but when executing

sudo dnf system-upgrade download --releasever=27 ‐‐allowerasing

it turns out that there is not enough space to complete the upgrade.

My available disk space can be seen below

[root@pcen35240 ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 3.8G     0  3.8G   0% /dev
tmpfs                    3.8G  111M  3.7G   3% /dev/shm
tmpfs                    3.8G  1.8M  3.8G   1% /run
tmpfs                    3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/mapper/fedora-root   50G   44G  2.6G  95% /
tmpfs                    3.8G   32K  3.8G   1% /tmp
/dev/nvme0n1p1           477M  174M  274M  39% /boot
/dev/mapper/fedora-home  178G   91G   79G  54% /home
tmpfs                    762M   64K  762M   1% /run/user/1000

Firstly it seems odd that there is so much space occupied from / (It's my work's laptop, so I didn't set it up).

What should I do to complete the upgrade? Is it possible to reallocate some space from /home/ to /?

  • It looks like you are using LVM and so you should be able to allocate more space and resize root accordingly. I would analyse the space on root first if you are convinced that so much space shouldn't be used. The "du" command will help you do this. Jan 5, 2018 at 11:15
  • @RamanSailopal : Thank you very much for your comment! Can you help me with that? For instance how did you realised that I am using LVM (I'll try to find out what that is)? And how to resize root?
    – Thanos
    Jan 5, 2018 at 12:30

3 Answers 3


Do some housekeeping to clean-up diskspace in your root partition. 50G is usually enough - no need to resize partitions.

Try to clean your packetmanagers's cache. Just do a dnf clean all:

   dnf clean dbcache
          Removes cache files generated from the repository metadata. This forces DNF to regenerate the cache files the next time it is run.

   dnf clean expire-cache
          Removes local cookie files saying when the metadata and mirrorlists were downloaded for each repo. DNF will re-validate the cache for each repo the next time it is used.

   dnf clean metadata
          Removes repository metadata. Those are the files which DNF uses to determine the remote availability of packages. Using this option will make DNF download all the metadata the next time it is

   dnf clean packages
          Removes any cached packages from the system.

   dnf clean plugins
          Tells all enabled plugins to eliminate their cached data.

   dnf clean all
          Does all of the above.

Uninstall unused packages. Shows you what is installed: dnf list installed.

Other places to look is /root /opt /srv sometimes there are downloaded files or custom installs.

The following command will give you info how much space is used in each directory.

sudo du -sh /root /opt /srv

The next command shows the ten biggest files on your system (could take a while):

sudo du -hsx /* | sort -rh | head -10
  • Thank you very much for your answer! The dnf clean all freed up only 300 MB. As far as the packages are concerned, there are a lot which I haven't installed so they could be necessary for the system. I removed some files from \root (~180MB) but there are still 750 MB left. In opt there are ~500MB but I don't know if it's safe to remove them. For the large files /home = 91G, /var=23G, /usr=20G, /root=750MB... The thinkg is that I freed up space from /home but it's not enough, that's why I though I should've allocated some more space to /.
    – Thanos
    Jan 5, 2018 at 12:49
  • 1
    A full /var/log could be the issue... try du -had 1 /var/log | sort -h to find if there are old logs that could be deleted or maybe something is overlogging
    – baselab
    Jan 5, 2018 at 14:19
  • Also see if you have anything hogging space in /var/tmp.
    – mattdm
    Jan 6, 2018 at 1:28
  • Anything in /opt was installed from some third-party software, not Fedora itself. It should be safe to remove that as long as you know what it is and where to get it again.
    – mattdm
    Jan 6, 2018 at 1:28
  • @baselab : Thanks for your comment! I run sudo du -had 1 /var/log | sort -h and the output is there pastebin.com/9Xpb6yMu In the output I see that the /var/log/journal takes up 2.0 Gb. Is this normal?
    – Thanos
    Jan 6, 2018 at 12:29

Well, if everything exposed so far does not solve the space problem or you do not feel like removing software that you consider important, you can always play with the file structure and symbolic links.

I usually have similar problems, as long as my system / hangs from a fairly tight nvme hard drive, instead, the /home directory hangs from an ssd with much more than space than /. What do I usually do when upgrading? Easy:

cp -R /var/lib/dnf/system-upgrade /home/system-upgrade
rm -rf /var/lib/dnf/system-upgrade
ln -s /home/system-upgrade /var/lib/dnf/system-upgrade

You just need another drive to move your files.


Error Summary Disk Requirements: At least xMB more space needed on the / filesystem

Works on Fedora (source) to provide enough space to upgrade to latest OS version:

sudo dnf system-upgrade download --releasever=36 --downloaddir=<path>

Else delete e.g 650MB of log files:

du -had 1 /var/log | sort -h

cd /var/log/journal

cd <dir e.g: 0d93c059916c411e9a2acd390078fdb0>

sudo rm system@*

sudo rm user-1000@*

Else remove old Kernals e.g 75MB of files:

dnf remove --oldinstallonly --setopt installonly_limit=2 kernel

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.