将删除debian包删除数据?

我找不到有关debian软件包在被删除时应该如何performance的确切信息。 它应该删除数据? 例如对于MySQL我读取数据保持这听起来符合逻辑(使用清除将删除所有的东西)。

但是在这里我find了文字:

删除和清除的区别在于,删除只删除数据和可执行文件,清除也删除所有的configuration文件。

那么,什么是真的?

更新因为我想打包一个ElasticSearch我需要知道什么是预期的。

清除或删除都不会删除mysql datadir ..看例子

root@mail:~# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 34 Server version: 5.1.41-3ubuntu12.10 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database so; Query OK, 1 row affected (0.00 sec) mysql> use so; Database changed mysql> CREATE TABLE example_autoincrement ( -> id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -> data VARCHAR(100) -> ); Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO example_autoincrement (data) VALUES ('Hello world'); Query OK, 1 row affected (0.00 sec) mysql> Bye root@mail:~# apt-get remove mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libnet-daemon-perl libdbi-perl libhtml-template-perl mysql-server-core-5.1 mysql-client-core-5.1 libdbd-mysql-perl libplrpc-perl mysql-server-5.1 mysql-client-5.1 Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: mysql-server 0 upgraded, 0 newly installed, 1 to remove and 49 not upgraded. After this operation, 131kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 52161 files and directories currently installed.) Removing mysql-server ... root@mail:~# ls /var/lib/mysql/ debian-5.1.flag ibdata1 ib_logfile0 ib_logfile1 mail.pid mysql mysql_upgrade_info so root@mail:~# apt-get install mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: mysql-server 0 upgraded, 1 newly installed, 0 to remove and 49 not upgraded. Need to get 94.8kB of archives. After this operation, 131kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main mysql-server 5.1.41-3ubuntu12.10 [94.8kB] Fetched 94.8kB in 0s (98.4kB/s) Selecting previously deselected package mysql-server. (Reading database ... 52158 files and directories currently installed.) Unpacking mysql-server (from .../mysql-server_5.1.41-3ubuntu12.10_all.deb) ... Setting up mysql-server (5.1.41-3ubuntu12.10) ... root@mail:~# /etc/init.d^C root@mail:~# service mysql start start: Job is already running: mysql root@mail:~# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 35 Server version: 5.1.41-3ubuntu12.10 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | so | +--------------------+ 3 rows in set (0.00 sec) mysql> Bye root@mail:~# apt-get purge mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libnet-daemon-perl libdbi-perl libhtml-template-perl mysql-server-core-5.1 mysql-client-core-5.1 libdbd-mysql-perl libplrpc-perl mysql-server-5.1 mysql-client-5.1 Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: mysql-server* 0 upgraded, 0 newly installed, 1 to remove and 49 not upgraded. After this operation, 131kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 52161 files and directories currently installed.) Removing mysql-server ... root@mail:~# root@mail:~# root@mail:~# ls /var/lib/mysql/ debian-5.1.flag ibdata1 ib_logfile0 ib_logfile1 mail.pid mysql mysql_upgrade_info so root@mail:~# 

我认为它所指的“数据”是包中的任何不可执行资源,例如/ usr / share中的东西。 你特别关心mysql或者其他的包吗?

如果数据对您有价值,您应该备份它。

因为我想打包一个ElasticSearch我需要知道什么是预期的。

如果我正确理解了你,你正在将ElasticSearch打包为.deb进行分发。

如果是这种情况,并且您正在构build一个用于公开发布的.deb包,我build议您1)完整阅读Debian Developer's Reference中关于打包的相关章节,并询问相应的Debian邮件列表(可能是Debian-Developer)。

一般来说, remove将只删除与软件包相关联的二进制文件和库,而purge将删除二进制文件,库,文档和configuration文件。 如果您的软件包没有至less通知他们,那么认为用户的数据是坏的forms。

我真的build议你在决定如何进行之前,先咨询一位经验丰富的Debian维护者 – 特别是如果你想将这个软件包提交给Debian仓库。

设备的另一个词:作为一个长期的Debian用户,几乎没有什么比第三方分发他们的软件更像一个遵循标准Debian惯例的.deb而让我恼火。 如果您想保留您的用户,请确保您的软件包保持良好并符合Debian团队制定的指导原则。