Introduction
This is an article where the main content is to focus on discussing about how to remove the initialization script of a service. In any operating system, it will manage service running on it. Not to mention in this context article, the Linux Ubuntu 19.10 operating system. Basically, this article will have an opposite impact on the other article in this link. That link has a title of ‘How to Register Initialization Script for Managing Service in Linux Ubuntu 19.10 Operating System’. It will remove the symbolic link of an available service where it exist through the register process of the initialization script. In Ubuntu, according to the article exist in this link, there are three main init system in Linux Ubuntu operating system. Those main init system are :
- Systemd
- Upstart
- SysV
Removing the initialization script
There are further information about the main init system but in this context, it will focus on the Upstart init system. It will discuss about how to remove the initialization script of the Upstart init system. In order to remove the script along with the init system itself, just do the following step :
1. Don’t forget for the first step to remove it, switch to ‘root’, super admin or super user.
2. Just remove or delete the initialization script file. Usually, it exist in ‘/etc/init.d’. So, if there is a script with the name of ‘mysqld57’, just execute the following command to remove it :
user@hostname:/etc/init.d$ rm -rf mysqld57 rm: cannot remove 'mysqld57-2': Permission denied user@hostname:/etc/init.d$
Just for an example, the above execution to remove the file or script will end in a failure. It happens when the command execution to remove the script of file is using a non ‘root’ account.
So, using the ‘root’ command, if there is a script with the name of ‘mysqld57’, just execute the following command to remove it :
user@hostname:/etc/init.d$ sudo su - [sudo] password for user: root@hostname:~# cd /etc/init.d/ root@hostname:/etc/init.d# rm -rf mysqld57
3. Following the above step, execute this command to remove the symbolic link from the directory of ‘/etc/rcrunlevel.d’ :
update-rc.d msyqld57 remove root@hostname:/etc/init.d# update-rc.d -f mysqld57 remove root@hostname:/etc/init.d#