how to remove systemctl service? (Arch-Linux)

1

Before your flag this as a duplicate question, I have looked through all the questions with the same problem and none of the solutions worked for me.

I was new to installing Arch-linux and was following a shoddy tutorial, in the tutorial, the man explained that I should use:

sudo systemctl enable dchpcd@wl01.service

so that it automatically starts the wifi service when I boot up, however, I spelled the device name incorrectly, it is actually wlo1 not wl01. Now everytime I boot up, I have to wait 1m 30s for the attempted service start to time out. I tried to get rid of it in multiple ways like

sudo systemctl disable dhcpcd@wl01.service
sudo systemctl disable wl01.service
sudo systemctl reset-failed

all of which hasn't fixed my problem, the first one comes back saying that there is no such file or directory. How can I get rid of this?

Thanks

Pavilion Sahota

Posted 2016-10-09T11:51:50.683

Reputation: 11

3If service is really enabled, it should create a symbolic link under /etc/systemd/system/. Look there if you can find the version with typo. For example with 'find /etc/systemd/system -name w*.service` – Marek Rost – 2016-10-09T13:11:55.257

Unfortunately not :/ Only 3 files: display-manager.service, getty.target.wants, multi-user.target.wants :/ – Pavilion Sahota – 2016-10-10T07:56:56.703

1those .wants shouldn't be files but folders which represent systemd targets (equivalent of init level in sysvinit, do look that up so you get a bit of background knowledge :) Obviously it should be in one of them. Thats why i was hinting with find command that searches recursively. – Marek Rost – 2016-10-10T09:42:18.887

Answers

0

The document in man systemctl explains that the enable commands makes symlinks and the disable commands removes them. It refers to the documentation for the [Install] section of unit files for more information.

man systemd.unit has some docs related to the [Install] section which provides an example of where a symlink is stored. If the [Install] section contains WantedBy=multi-user-.target, then the symlink would be created in: /etc/systemd/system/multi-user.target.wants/foo.service

So, check the [Install] section in the the related dhcpcd service file, and then check that the related symlink has been deleted.

Finally, as described in man systemctl, there is an even stronger version of disable called mask which prevents absolutely all forms of starting your service, so you can try that, too.

Mark Stosberg

Posted 2016-10-09T11:51:50.683

Reputation: 497