Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing with apt leaves files/folders leftover in python dist-packages #38

Open
obbardc opened this issue May 30, 2018 · 4 comments
Open
Assignees
Milestone

Comments

@obbardc
Copy link
Member

obbardc commented May 30, 2018

apt-get purge pdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  debugedit funnelweb git-core kpartx liblua5.2-0 libnspr4 libnss3 librpm3 librpmbuild3 librpmio3 librpmsign3 python-egenix-mxtexttools python-egenix-mxtools python-pexpect python-ptyprocess python-smartpm rpm
  rpm-common rpm2cpio smartpm-core
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  pdk* pdk-mediagen*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 1,564 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 49213 files and directories currently installed.)
Removing pdk (1.0.0~alpha1) ...
dpkg: warning: while removing pdk, directory '/usr/lib/python2.7/dist-packages/picax' not empty so not removed
dpkg: warning: while removing pdk, directory '/usr/lib/python2.7/dist-packages/pdk/xml_legacy/utils' not empty so not removed
dpkg: warning: while removing pdk, directory '/usr/lib/python2.7/dist-packages/pdk/xml_legacy/sax' not empty so not removed
dpkg: warning: while removing pdk, directory '/usr/lib/python2.7/dist-packages/pdk/xml_legacy/parsers/xmlproc' not empty so not removed
Processing triggers for man-db (2.7.6.1-2) ...
@obbardc obbardc added this to the 1.0 milestone May 30, 2018
@obbardc
Copy link
Member Author

obbardc commented May 30, 2018

Workaround:

apt@pdk:~$ sudo rm -rf /usr/lib/python2.7/dist-packages/picax
apt@pdk:~$ sudo rm -rf /usr/lib/python2.7/dist-packages/pdk

@danielhjames danielhjames self-assigned this May 31, 2018
@danielhjames
Copy link
Member

Ah, https://github.com/64studio/pdk/tree/master/debian does not include a postrm file with a purge case. I can take care of that.

@obbardc
Copy link
Member Author

obbardc commented May 31, 2018

I thought python install/remove is handled with setup.py through the include /usr/share/cdbs/1/class/python-distutils.mk in debian/rules?

@danielhjames
Copy link
Member

I will look into that, thanks for the tip!. Usually I handle this kind of thing via the debian/postrm file because it enables you to have different actions for remove versus purge of the package. A purge should leave nothing behind, but in some cases you want the remove to leave certain parts intact to support a later install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants