Apt: install packages to a different location
up vote
1
down vote
favorite
Problem:
I have a Lubuntu persistent USB install. I started using it due to problems with my hard drive (Samsung 850 Evo) which used to have Ubuntu installed. My computer (MacBook Pro 9,2) had OSX but after a filesystem corruption I installed Ubuntu. Ubuntu became unbootable shortly after (literally a couple reboots). I formated the disk and decided to start using the live USB with persistence enabled.
Question:
I can't install more packages because I have almost no space left on my 4GB USB. I can perfectly mount the hard drive and store files there, read/write, etc. Is there a way to install the packages into the hard drive and turn /usr to a symlink to /mnt/mydrive ?
I don't care if it's a bad practice or something like that. I would like to know if it's feasible and if so, some instructions and/or recommendations on how to achieve it.
apt live-usb lubuntu
New contributor
add a comment |
up vote
1
down vote
favorite
Problem:
I have a Lubuntu persistent USB install. I started using it due to problems with my hard drive (Samsung 850 Evo) which used to have Ubuntu installed. My computer (MacBook Pro 9,2) had OSX but after a filesystem corruption I installed Ubuntu. Ubuntu became unbootable shortly after (literally a couple reboots). I formated the disk and decided to start using the live USB with persistence enabled.
Question:
I can't install more packages because I have almost no space left on my 4GB USB. I can perfectly mount the hard drive and store files there, read/write, etc. Is there a way to install the packages into the hard drive and turn /usr to a symlink to /mnt/mydrive ?
I don't care if it's a bad practice or something like that. I would like to know if it's feasible and if so, some instructions and/or recommendations on how to achieve it.
apt live-usb lubuntu
New contributor
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Problem:
I have a Lubuntu persistent USB install. I started using it due to problems with my hard drive (Samsung 850 Evo) which used to have Ubuntu installed. My computer (MacBook Pro 9,2) had OSX but after a filesystem corruption I installed Ubuntu. Ubuntu became unbootable shortly after (literally a couple reboots). I formated the disk and decided to start using the live USB with persistence enabled.
Question:
I can't install more packages because I have almost no space left on my 4GB USB. I can perfectly mount the hard drive and store files there, read/write, etc. Is there a way to install the packages into the hard drive and turn /usr to a symlink to /mnt/mydrive ?
I don't care if it's a bad practice or something like that. I would like to know if it's feasible and if so, some instructions and/or recommendations on how to achieve it.
apt live-usb lubuntu
New contributor
Problem:
I have a Lubuntu persistent USB install. I started using it due to problems with my hard drive (Samsung 850 Evo) which used to have Ubuntu installed. My computer (MacBook Pro 9,2) had OSX but after a filesystem corruption I installed Ubuntu. Ubuntu became unbootable shortly after (literally a couple reboots). I formated the disk and decided to start using the live USB with persistence enabled.
Question:
I can't install more packages because I have almost no space left on my 4GB USB. I can perfectly mount the hard drive and store files there, read/write, etc. Is there a way to install the packages into the hard drive and turn /usr to a symlink to /mnt/mydrive ?
I don't care if it's a bad practice or something like that. I would like to know if it's feasible and if so, some instructions and/or recommendations on how to achieve it.
apt live-usb lubuntu
apt live-usb lubuntu
New contributor
New contributor
New contributor
asked 2 days ago
Maganna Dev
263
263
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
2 days ago
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
2 days ago
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
2 days ago
1
Probably. Thank you very much.
– Maganna Dev
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
2 days ago
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
2 days ago
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
2 days ago
1
Probably. Thank you very much.
– Maganna Dev
2 days ago
add a comment |
up vote
1
down vote
accepted
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
2 days ago
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
2 days ago
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
2 days ago
1
Probably. Thank you very much.
– Maganna Dev
2 days ago
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
answered 2 days ago
Romeo Ninov
4,89431627
4,89431627
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
2 days ago
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
2 days ago
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
2 days ago
1
Probably. Thank you very much.
– Maganna Dev
2 days ago
add a comment |
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
2 days ago
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
2 days ago
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
2 days ago
1
Probably. Thank you very much.
– Maganna Dev
2 days ago
So I should uninstall packages installed via apt, and reinstall them using
dpkg
with --instdir
option? I'm also guessing that I need to add /mnt/mydrive
to my $PATH
.– Maganna Dev
2 days ago
So I should uninstall packages installed via apt, and reinstall them using
dpkg
with --instdir
option? I'm also guessing that I need to add /mnt/mydrive
to my $PATH
.– Maganna Dev
2 days ago
@MagannaDev actually you need to add
/mnt/mydrive/bin
, /mnt/mydrive/sbin
and so on. And to add in /etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)– Romeo Ninov
2 days ago
@MagannaDev actually you need to add
/mnt/mydrive/bin
, /mnt/mydrive/sbin
and so on. And to add in /etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)– Romeo Ninov
2 days ago
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
2 days ago
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
2 days ago
1
1
Probably. Thank you very much.
– Maganna Dev
2 days ago
Probably. Thank you very much.
– Maganna Dev
2 days ago
add a comment |
Maganna Dev is a new contributor. Be nice, and check out our Code of Conduct.
Maganna Dev is a new contributor. Be nice, and check out our Code of Conduct.
Maganna Dev is a new contributor. Be nice, and check out our Code of Conduct.
Maganna Dev is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482787%2fapt-install-packages-to-a-different-location%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown