how to change dpkg installation directory?

H.S. hs.samix at gmail.com
Wed Jun 17 19:32:26 UTC 2009


Bram Kuijper wrote:
> Hi all,
> 
> I want to change the default directory into which dpkg installs my 
> applications, since I have too little space on my rootdisk. However, I 
> changed the necessary configuration in /etc/dpkg/dpkg.cfg, but now 
> nothing will install anymore. What should I do?
> 
> This is what I did:
> In /etc/dpkg/dpkg.cfg i added the following line:
> instdir /media/disk-4/bram/root
> 
> This directory is writable by root.
> 
> Then I did:
> dpkg --configure -a
> 
> works perfectly.
> 
> Then I installed some program, let's do java:
> sudo apt-get install openjdk-6-jre


dpkg specifically has two flags for this kind of stuff:
--admindir
--instdir

In your case, if you had the deb of a package, using the second flag
with the dpkg flag should suffice. Do man dpkg for details. Not sure how
to make these as default changes though.

Having said this, I would strongly recommend assigning a large enough
partition for / (or at least for /usr (if this is a separate partition)
where the packages' bulk files get installed).

Regards.




-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.





More information about the ubuntu-users mailing list