Skip to content

Additional note for https://linuxhacks.org/how-to-remove-systemd-services/ #1

@PenelopeFudd

Description

@PenelopeFudd

With newer versions of systemd, typing

  • systemd-analyze unit-paths or
  • systemd-analyze --user unit-paths will dump the list of directories where systemd looks for unit files.

With older versions, type

  • pkg-config systemd --variable=systemdsystemunitpath or
  • pkg-config systemd --variable=systemduserunitpath

Also, if you delete a unit file before stopping a service, it can get in a state where you can't seem to delete it.
That persistence is actually a feature; the entry lingers so that you can do systemctl status $your_service after it's gone. Once you've read it, do this:

  • systemctl stop $your_service -- if not stopped already
  • possibly wait a minute or two for the stop process to time out
  • systemctl reset-failed $your_service

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions