description: How to efficiently destroy your distribution
disqus: false
categories:
tags:
- linux
- fedora
---
I have installed Fedora on my computer 3 or 4 years ago. Since this installation, I have installed many packages and upgraded it every 6 months. Unfortunately, Gnome Software has never worked for me, and I never took the time to debug it. Like many people, I am using the old method with `dnf-system-upgrade`, which worked pretty well. But this time, I had a segfault on dnf during the offline upgrade. The only information I got was the following lines:
`dnf-system-upgrade` uses a feature of systemd described here: [Implementing Offline System Updates](https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html).
By creating a symlink named `/system-update`, at the next reboot systemd will boot to a specific target named `system-update.target`. That's what we name "an offline upgrade" contrary to an upgrade run in the `default.target` which I call "an online upgrade".
We can see [in the source of the plugin](https://github.com/rpm-software-management/dnf-plugins-extras/blob/master/plugins/system_upgrade.py) that a symlink pointing to a dnf folder is created:
```python
DEFAULT_DATADIR = '/var/lib/dnf/system-upgrade'
MAGIC_SYMLINK = '/system-update'
# ...
os.symlink(DEFAULT_DATADIR, MAGIC_SYMLINK)
# ...
reboot()
```
We can now investigate which services are triggered by this target:
```raw
$ ls /usr/lib/systemd/system/system-update.target.wants/
Your computer will automatically reboot at the end. Now you'll have either a working Fedora 27 or a broken Linux distribution. Good luck and have fun !