Generally when I run a dpkg
or apt-get
to install a package it copies some files to specific locations. Such as the mpv files is coppied to these locations (got by trying dpkg --listfiles mpv
):
/.
/etc
/etc/mpv
/etc/mpv/encoding-profiles.conf
/etc/mpv/mpv.conf
/usr
/usr/bin
/usr/bin/mpv
/usr/share
/usr/share/applications
/usr/share/applications/mpv.desktop
/usr/share/doc
/usr/share/doc/mpv
/usr/share/doc/mpv/README.md.gz
/usr/share/doc/mpv/changelog.Debian.gz
/usr/share/doc/mpv/copyright
/usr/share/doc/mpv/edl-mpv.rst.gz
/usr/share/doc/mpv/encoding.rst.gz
/usr/share/doc/mpv/examples
/usr/share/doc/mpv/examples/lua
/usr/share/doc/mpv/examples/lua/README.md
/usr/share/doc/mpv/examples/lua/acompressor.lua.gz
/usr/share/doc/mpv/examples/lua/ao-null-reload.lua
/usr/share/doc/mpv/examples/lua/audio-hotplug-test.lua
/usr/share/doc/mpv/examples/lua/autocrop.lua
/usr/share/doc/mpv/examples/lua/autodeint.lua.gz
/usr/share/doc/mpv/examples/lua/autoload.lua.gz
/usr/share/doc/mpv/examples/lua/cycle-deinterlace-pullup.lua
/usr/share/doc/mpv/examples/lua/observe-all.lua
/usr/share/doc/mpv/examples/lua/ontop-playback.lua
/usr/share/doc/mpv/examples/lua/pause-when-minimize.lua
/usr/share/doc/mpv/examples/lua/status-line.lua
/usr/share/doc/mpv/input.conf.gz
/usr/share/doc/mpv/mplayer-input.conf
/usr/share/doc/mpv/mpv.conf.gz
/usr/share/doc/mpv/restore-old-bindings.conf
/usr/share/doc/mpv/tech-overview.txt.gz
/usr/share/doc/mpv/waf-buildsystem.rst.gz
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/16x16
/usr/share/icons/hicolor/16x16/apps
/usr/share/icons/hicolor/16x16/apps/mpv.png
/usr/share/icons/hicolor/32x32
/usr/share/icons/hicolor/32x32/apps
/usr/share/icons/hicolor/32x32/apps/mpv.png
/usr/share/icons/hicolor/64x64
/usr/share/icons/hicolor/64x64/apps
/usr/share/icons/hicolor/64x64/apps/mpv.png
/usr/share/icons/hicolor/scalable
/usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/scalable/apps/mpv.svg
/usr/share/icons/hicolor/symbolic
/usr/share/icons/hicolor/symbolic/apps
/usr/share/icons/hicolor/symbolic/apps/mpv-symbolic.svg
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/mpv.1.gz
/usr/share/zsh
/usr/share/zsh/vendor-completions
/usr/share/zsh/vendor-completions/_mpv
Now I want to install a pkg let xyz_1.23.deb
to custom locations such as ~/xyz.
Is it possible that all files needs to operate the xyz
will be stored in this location?
It is possible with
dpkg
extract command (seeman dpkg
):For your case:
but you will need to install needed dependencies and adjust some environment variables manually such as:
To remove such "installed" package you will need to remove its folder:
and then correct environment variables back.
Please note that this solution is not-universal.
It may work with simple applications but may not work with comprehensive packages (having many dependencies).
For example it will work with simple GNU Hello application:
The test results are the following: