IntelliJ IDEA Ultimate is not available as an Arch Linux core package, and has a built-in upgrade mechanism. For these reasons it would be convenient to install it into my home directory, letting it upgrade itself without needing to rebuild the AUR package or running anything as root. Is this possible?

As far as I can tell from the PKGBUILD it refers to a pkgdir variable, but I can't find any makepkg flags to control it and export pkgdir="${HOME}/bin" doesn't seem to help.

1 Answer 1


Your plan is not recommended

Have a look at the File Hirarchy Standard page. You should never let pacman write to files in $HOME. This directory fully belongs to the user. pacman manages files in e.g. /usr/bin or /usr/lib and you should never manually change files there.

pacman installs files, not makepkg

makepkg copies files from srcdir to pkgdir. Typically this means make DSTDIR=$pkgdir install or similar. After that makepkg creates a tar file from the pkgdir directory.

pacman installs the content of the tar file to --root or --sysroot but both should not be used to install software to a custom directory.

What you can do

You could use makepkg to copy the files to $HOME/bin by changing the package() function in your PKGBUILD. This is what you describe in the question but I would rather let makepkg create a package and manually copy the content of the pkg directory to $HOME/.local/{bin,?}. Now you are sure that all needed files are installed and you still own all files in $HOME.

If you want that this package is in the pacman database, you could make an empty dummy package, that tracks dependencies and stops you from installing conflicting packages. You could change the package() function so that it only installs a text file with a comment.

Don't do that

Make the package() function install files to $pkgdir/home/you/bin and install the package with pacman.

  • That sounds like it's not at all a supported operation. Is that right? I'm not sure what to make of "Maybe you could make an empty dummy package to install dependencies."
    – l0b0
    Feb 28, 2021 at 9:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .