OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to add uninstall script to debian package

  • Thread starter Thread starter Waqas
  • Start date Start date
W

Waqas

Guest
I have created a simple debian package for my python program using this post. I am also using a postinst script to setup and populate mysql tables. The package gets installed with following command.

Code:
sudo apt install mypackage.deb

I now want to add an uninstall script so that if the package is removed, uninstall script gets called to cleanup the environment.

How can I incorporate uninstall script with the debian package?
<p>I have created a simple debian package for my python program using <a href="https://stackoverflow.com/questions/4623684/creating-debian-package/25720058#25720058">this post</a>.
I am also using a <code>postinst</code> script to setup and populate <code>mysql</code> tables. The package gets installed with following command.</p>

<pre><code>sudo apt install mypackage.deb
</code></pre>

<p>I now want to add an uninstall script so that if the package is removed, uninstall script gets called to cleanup the environment. </p>

<p>How can I incorporate uninstall script with the debian package?</p>
 

Latest posts

D
Replies
0
Views
1
Dhanushka Amarakoon
D
S
Replies
0
Views
1
Shikhar Ambashta
S
Top