How can I remove a package for a given user but leave it installed so that other users can still access it? I'm using Ubuntu 12.10.
How to remove a package for the current user?
linux;ubuntu
Most packages are installed in places and with permissions so they are accessible by multiple users. So unless the package has been prepared to take care of that by setting the permissions and ownership in a special way, it is not possible to achieve this by package removal.What a package could do to restrict access is to set the group permissions for directories and executables to rwxr-x--- and for normal files to rw-r-- and setting group ownership to a specific group so non-members of that group don't have access any more. You can do the above after the fact on most packages, as it does not change the structure of where things get installed. So the package will still find all of its components. Depending on what you exactly want to achieve it might suffice to just change the executables of the package.Assuming a package abc is installed you could do something like the following (as root):addgroup abcusersadduser user abcusersdpkg -L abc | xargs find -maxdepth 0 -type f | xargs chown o=dpkg -L abc | xargs find -maxdepth 0 -type f | xargs chgrp abcusersThe first line creates a group, the second line needs to be repeated for all users that need access to the package. The third and fourth line change the permissions on all the files of a package (assuming there are no filenames with spaces).This may however still break the package so be careful with which you do this and/or roll back your changes with:apt-get install --reinstall abc