Cleaning up unwanted files in a LiveUSB
up vote
1
down vote
favorite
After running Disk Usage Analyzer on the file system, I am looking for ways to remove unneeded files on my Live USB.
Firstly, is there anything I can do about the files in the casper archive? For example, I noticed that there exists a directory
/rofs
, which I'm sure stands for read-only file system, the one stored in the read-onlycasper
file, so I can't removing anything in it. Specifically, I removed LibreOffice yet /rofs/usr/lib/libreoffice takes up 222 MB of precious storage, as does Thunderbird and a bunch of other things.
What can I clear regarding the apt program files.
/var/lib/apt/lists
takes up 115 MB, and/var/cache/apt
(not thearchives
directory) is 139 MB. The/var/cache/apt
folder is made up of several ~35 MB files, and I don't know if they are all necessary:
ubuntu@ubuntu:/var/cache/apt$ du -ah
4.0K ./archives/partial
0 ./archives/lock
28K ./archives
4.0K ./typescript
34M ./srcpkgcache.bin
31M ./srcpkgcache.bin.ifDvIA
34M ./pkgcache.bin.3IHVIK
32K ./pkgcache.bin.h2Zwz7
36M ./pkgcache.bin
133M .
I already clear browsing data regularly when I use chrome, so I don't think I have to deal with that much. However, I see that there are cache folders for other programs, and I wish to know if there is a safe way to remove the cache.
Generally, my question revolves around why I have only less than 300 MB on my 4.0 GB USB thumb drive when I only use it for browsing and simple development in python.
Your help is appreciated.
live-usb cleanup
add a comment |
up vote
1
down vote
favorite
After running Disk Usage Analyzer on the file system, I am looking for ways to remove unneeded files on my Live USB.
Firstly, is there anything I can do about the files in the casper archive? For example, I noticed that there exists a directory
/rofs
, which I'm sure stands for read-only file system, the one stored in the read-onlycasper
file, so I can't removing anything in it. Specifically, I removed LibreOffice yet /rofs/usr/lib/libreoffice takes up 222 MB of precious storage, as does Thunderbird and a bunch of other things.
What can I clear regarding the apt program files.
/var/lib/apt/lists
takes up 115 MB, and/var/cache/apt
(not thearchives
directory) is 139 MB. The/var/cache/apt
folder is made up of several ~35 MB files, and I don't know if they are all necessary:
ubuntu@ubuntu:/var/cache/apt$ du -ah
4.0K ./archives/partial
0 ./archives/lock
28K ./archives
4.0K ./typescript
34M ./srcpkgcache.bin
31M ./srcpkgcache.bin.ifDvIA
34M ./pkgcache.bin.3IHVIK
32K ./pkgcache.bin.h2Zwz7
36M ./pkgcache.bin
133M .
I already clear browsing data regularly when I use chrome, so I don't think I have to deal with that much. However, I see that there are cache folders for other programs, and I wish to know if there is a safe way to remove the cache.
Generally, my question revolves around why I have only less than 300 MB on my 4.0 GB USB thumb drive when I only use it for browsing and simple development in python.
Your help is appreciated.
live-usb cleanup
I face the same problem: had a 1Gb flash drive and was suffering from lack of disk space (but Ubuntu was booting, at least). Now, using a 4Gb flash drive (capped to ~2Gb, as discussion) I'm facing the same problems, although I managed to install Java beyond booting. Something is definitely eating out disk.
– Tiago Cardoso
Dec 26 '15 at 18:55
If it helps, usingdf -Th
I can see /cow using 100% of available disk space. Question then should be... is it something that could be re-dimentioned?
– Tiago Cardoso
Dec 26 '15 at 21:37
for the point '2.', simply call apt clean functionality, his goal is to clean /var/cache/apt content : sudo apt-get clean
– adrenochrome
Feb 19 '16 at 9:31
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
After running Disk Usage Analyzer on the file system, I am looking for ways to remove unneeded files on my Live USB.
Firstly, is there anything I can do about the files in the casper archive? For example, I noticed that there exists a directory
/rofs
, which I'm sure stands for read-only file system, the one stored in the read-onlycasper
file, so I can't removing anything in it. Specifically, I removed LibreOffice yet /rofs/usr/lib/libreoffice takes up 222 MB of precious storage, as does Thunderbird and a bunch of other things.
What can I clear regarding the apt program files.
/var/lib/apt/lists
takes up 115 MB, and/var/cache/apt
(not thearchives
directory) is 139 MB. The/var/cache/apt
folder is made up of several ~35 MB files, and I don't know if they are all necessary:
ubuntu@ubuntu:/var/cache/apt$ du -ah
4.0K ./archives/partial
0 ./archives/lock
28K ./archives
4.0K ./typescript
34M ./srcpkgcache.bin
31M ./srcpkgcache.bin.ifDvIA
34M ./pkgcache.bin.3IHVIK
32K ./pkgcache.bin.h2Zwz7
36M ./pkgcache.bin
133M .
I already clear browsing data regularly when I use chrome, so I don't think I have to deal with that much. However, I see that there are cache folders for other programs, and I wish to know if there is a safe way to remove the cache.
Generally, my question revolves around why I have only less than 300 MB on my 4.0 GB USB thumb drive when I only use it for browsing and simple development in python.
Your help is appreciated.
live-usb cleanup
After running Disk Usage Analyzer on the file system, I am looking for ways to remove unneeded files on my Live USB.
Firstly, is there anything I can do about the files in the casper archive? For example, I noticed that there exists a directory
/rofs
, which I'm sure stands for read-only file system, the one stored in the read-onlycasper
file, so I can't removing anything in it. Specifically, I removed LibreOffice yet /rofs/usr/lib/libreoffice takes up 222 MB of precious storage, as does Thunderbird and a bunch of other things.
What can I clear regarding the apt program files.
/var/lib/apt/lists
takes up 115 MB, and/var/cache/apt
(not thearchives
directory) is 139 MB. The/var/cache/apt
folder is made up of several ~35 MB files, and I don't know if they are all necessary:
ubuntu@ubuntu:/var/cache/apt$ du -ah
4.0K ./archives/partial
0 ./archives/lock
28K ./archives
4.0K ./typescript
34M ./srcpkgcache.bin
31M ./srcpkgcache.bin.ifDvIA
34M ./pkgcache.bin.3IHVIK
32K ./pkgcache.bin.h2Zwz7
36M ./pkgcache.bin
133M .
I already clear browsing data regularly when I use chrome, so I don't think I have to deal with that much. However, I see that there are cache folders for other programs, and I wish to know if there is a safe way to remove the cache.
Generally, my question revolves around why I have only less than 300 MB on my 4.0 GB USB thumb drive when I only use it for browsing and simple development in python.
Your help is appreciated.
live-usb cleanup
live-usb cleanup
asked Mar 18 '12 at 11:09
ladaghini
480718
480718
I face the same problem: had a 1Gb flash drive and was suffering from lack of disk space (but Ubuntu was booting, at least). Now, using a 4Gb flash drive (capped to ~2Gb, as discussion) I'm facing the same problems, although I managed to install Java beyond booting. Something is definitely eating out disk.
– Tiago Cardoso
Dec 26 '15 at 18:55
If it helps, usingdf -Th
I can see /cow using 100% of available disk space. Question then should be... is it something that could be re-dimentioned?
– Tiago Cardoso
Dec 26 '15 at 21:37
for the point '2.', simply call apt clean functionality, his goal is to clean /var/cache/apt content : sudo apt-get clean
– adrenochrome
Feb 19 '16 at 9:31
add a comment |
I face the same problem: had a 1Gb flash drive and was suffering from lack of disk space (but Ubuntu was booting, at least). Now, using a 4Gb flash drive (capped to ~2Gb, as discussion) I'm facing the same problems, although I managed to install Java beyond booting. Something is definitely eating out disk.
– Tiago Cardoso
Dec 26 '15 at 18:55
If it helps, usingdf -Th
I can see /cow using 100% of available disk space. Question then should be... is it something that could be re-dimentioned?
– Tiago Cardoso
Dec 26 '15 at 21:37
for the point '2.', simply call apt clean functionality, his goal is to clean /var/cache/apt content : sudo apt-get clean
– adrenochrome
Feb 19 '16 at 9:31
I face the same problem: had a 1Gb flash drive and was suffering from lack of disk space (but Ubuntu was booting, at least). Now, using a 4Gb flash drive (capped to ~2Gb, as discussion) I'm facing the same problems, although I managed to install Java beyond booting. Something is definitely eating out disk.
– Tiago Cardoso
Dec 26 '15 at 18:55
I face the same problem: had a 1Gb flash drive and was suffering from lack of disk space (but Ubuntu was booting, at least). Now, using a 4Gb flash drive (capped to ~2Gb, as discussion) I'm facing the same problems, although I managed to install Java beyond booting. Something is definitely eating out disk.
– Tiago Cardoso
Dec 26 '15 at 18:55
If it helps, using
df -Th
I can see /cow using 100% of available disk space. Question then should be... is it something that could be re-dimentioned?– Tiago Cardoso
Dec 26 '15 at 21:37
If it helps, using
df -Th
I can see /cow using 100% of available disk space. Question then should be... is it something that could be re-dimentioned?– Tiago Cardoso
Dec 26 '15 at 21:37
for the point '2.', simply call apt clean functionality, his goal is to clean /var/cache/apt content : sudo apt-get clean
– adrenochrome
Feb 19 '16 at 9:31
for the point '2.', simply call apt clean functionality, his goal is to clean /var/cache/apt content : sudo apt-get clean
– adrenochrome
Feb 19 '16 at 9:31
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
You would need to make a custom .iso to modify those files.
See : Can I build a Ubuntu ISO from a manifest?
The root file system is compressed to fit on the iso, but casper mounts the file system ro (rofs).
You can use persistence , but persistence takes up even more space (cow).
How did you make your usb ? The iso should take up only 700 Mb or so, do you have other data stored on the usb ? Persistence ?
1
I have persistent storage (casper-rw) and I really just installed chromium, vlc, (I left Firefox on,) I removed big apps like Thunderbird and LibreOffice. I'm thinking that there are unused packages (like libraries) left behind from some of those uninstalls.
– ladaghini
Mar 18 '12 at 14:57
2.5GB is the maximum capacity, and like I said, I have like 300MB remaining.
– ladaghini
Mar 18 '12 at 15:29
1
2.5 GB is the maximum capacity, which, as I said earlier, I was reaching. What I would like to know is what is filling up that 2.5 GB (which used to be 2.0, but I added another 512 MB) As far as I am concerned, I have fewer programs installed (space usage wise) than a fresh live USB. And yet, even after adding another 512 MB, I have a measly 300 MB left. There must be some useless files just lurking around.
– ladaghini
Mar 19 '12 at 14:59
The files on the iso are read only, you can not delete them. A cow file system makes a copy of the files and tracks the changes, so it takes a lot of space. en.wikipedia.org/wiki/Copy-on-write Again, you need to either remaster the iso or perform a standard installation, but persistence does not work they way you think it does, thus it is not behaving as you expect.
– Panther
Mar 19 '12 at 15:39
add a comment |
up vote
1
down vote
A quick fix is to reduce the archived journals. On my LiveCD those files occupied 300M. Handy when down to 0.
sudo journalctl --vacuum-size=50M
how to clear journal
Then edit journald.conf
sudo nano /etc/systemd/journald.conf
set to desired value:
#SystemMaxUse=50M
After reboot this setting has no effect on Mint.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You would need to make a custom .iso to modify those files.
See : Can I build a Ubuntu ISO from a manifest?
The root file system is compressed to fit on the iso, but casper mounts the file system ro (rofs).
You can use persistence , but persistence takes up even more space (cow).
How did you make your usb ? The iso should take up only 700 Mb or so, do you have other data stored on the usb ? Persistence ?
1
I have persistent storage (casper-rw) and I really just installed chromium, vlc, (I left Firefox on,) I removed big apps like Thunderbird and LibreOffice. I'm thinking that there are unused packages (like libraries) left behind from some of those uninstalls.
– ladaghini
Mar 18 '12 at 14:57
2.5GB is the maximum capacity, and like I said, I have like 300MB remaining.
– ladaghini
Mar 18 '12 at 15:29
1
2.5 GB is the maximum capacity, which, as I said earlier, I was reaching. What I would like to know is what is filling up that 2.5 GB (which used to be 2.0, but I added another 512 MB) As far as I am concerned, I have fewer programs installed (space usage wise) than a fresh live USB. And yet, even after adding another 512 MB, I have a measly 300 MB left. There must be some useless files just lurking around.
– ladaghini
Mar 19 '12 at 14:59
The files on the iso are read only, you can not delete them. A cow file system makes a copy of the files and tracks the changes, so it takes a lot of space. en.wikipedia.org/wiki/Copy-on-write Again, you need to either remaster the iso or perform a standard installation, but persistence does not work they way you think it does, thus it is not behaving as you expect.
– Panther
Mar 19 '12 at 15:39
add a comment |
up vote
0
down vote
accepted
You would need to make a custom .iso to modify those files.
See : Can I build a Ubuntu ISO from a manifest?
The root file system is compressed to fit on the iso, but casper mounts the file system ro (rofs).
You can use persistence , but persistence takes up even more space (cow).
How did you make your usb ? The iso should take up only 700 Mb or so, do you have other data stored on the usb ? Persistence ?
1
I have persistent storage (casper-rw) and I really just installed chromium, vlc, (I left Firefox on,) I removed big apps like Thunderbird and LibreOffice. I'm thinking that there are unused packages (like libraries) left behind from some of those uninstalls.
– ladaghini
Mar 18 '12 at 14:57
2.5GB is the maximum capacity, and like I said, I have like 300MB remaining.
– ladaghini
Mar 18 '12 at 15:29
1
2.5 GB is the maximum capacity, which, as I said earlier, I was reaching. What I would like to know is what is filling up that 2.5 GB (which used to be 2.0, but I added another 512 MB) As far as I am concerned, I have fewer programs installed (space usage wise) than a fresh live USB. And yet, even after adding another 512 MB, I have a measly 300 MB left. There must be some useless files just lurking around.
– ladaghini
Mar 19 '12 at 14:59
The files on the iso are read only, you can not delete them. A cow file system makes a copy of the files and tracks the changes, so it takes a lot of space. en.wikipedia.org/wiki/Copy-on-write Again, you need to either remaster the iso or perform a standard installation, but persistence does not work they way you think it does, thus it is not behaving as you expect.
– Panther
Mar 19 '12 at 15:39
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You would need to make a custom .iso to modify those files.
See : Can I build a Ubuntu ISO from a manifest?
The root file system is compressed to fit on the iso, but casper mounts the file system ro (rofs).
You can use persistence , but persistence takes up even more space (cow).
How did you make your usb ? The iso should take up only 700 Mb or so, do you have other data stored on the usb ? Persistence ?
You would need to make a custom .iso to modify those files.
See : Can I build a Ubuntu ISO from a manifest?
The root file system is compressed to fit on the iso, but casper mounts the file system ro (rofs).
You can use persistence , but persistence takes up even more space (cow).
How did you make your usb ? The iso should take up only 700 Mb or so, do you have other data stored on the usb ? Persistence ?
edited Apr 13 '17 at 12:23
Community♦
1
1
answered Mar 18 '12 at 13:48
Panther
77.2k12156258
77.2k12156258
1
I have persistent storage (casper-rw) and I really just installed chromium, vlc, (I left Firefox on,) I removed big apps like Thunderbird and LibreOffice. I'm thinking that there are unused packages (like libraries) left behind from some of those uninstalls.
– ladaghini
Mar 18 '12 at 14:57
2.5GB is the maximum capacity, and like I said, I have like 300MB remaining.
– ladaghini
Mar 18 '12 at 15:29
1
2.5 GB is the maximum capacity, which, as I said earlier, I was reaching. What I would like to know is what is filling up that 2.5 GB (which used to be 2.0, but I added another 512 MB) As far as I am concerned, I have fewer programs installed (space usage wise) than a fresh live USB. And yet, even after adding another 512 MB, I have a measly 300 MB left. There must be some useless files just lurking around.
– ladaghini
Mar 19 '12 at 14:59
The files on the iso are read only, you can not delete them. A cow file system makes a copy of the files and tracks the changes, so it takes a lot of space. en.wikipedia.org/wiki/Copy-on-write Again, you need to either remaster the iso or perform a standard installation, but persistence does not work they way you think it does, thus it is not behaving as you expect.
– Panther
Mar 19 '12 at 15:39
add a comment |
1
I have persistent storage (casper-rw) and I really just installed chromium, vlc, (I left Firefox on,) I removed big apps like Thunderbird and LibreOffice. I'm thinking that there are unused packages (like libraries) left behind from some of those uninstalls.
– ladaghini
Mar 18 '12 at 14:57
2.5GB is the maximum capacity, and like I said, I have like 300MB remaining.
– ladaghini
Mar 18 '12 at 15:29
1
2.5 GB is the maximum capacity, which, as I said earlier, I was reaching. What I would like to know is what is filling up that 2.5 GB (which used to be 2.0, but I added another 512 MB) As far as I am concerned, I have fewer programs installed (space usage wise) than a fresh live USB. And yet, even after adding another 512 MB, I have a measly 300 MB left. There must be some useless files just lurking around.
– ladaghini
Mar 19 '12 at 14:59
The files on the iso are read only, you can not delete them. A cow file system makes a copy of the files and tracks the changes, so it takes a lot of space. en.wikipedia.org/wiki/Copy-on-write Again, you need to either remaster the iso or perform a standard installation, but persistence does not work they way you think it does, thus it is not behaving as you expect.
– Panther
Mar 19 '12 at 15:39
1
1
I have persistent storage (casper-rw) and I really just installed chromium, vlc, (I left Firefox on,) I removed big apps like Thunderbird and LibreOffice. I'm thinking that there are unused packages (like libraries) left behind from some of those uninstalls.
– ladaghini
Mar 18 '12 at 14:57
I have persistent storage (casper-rw) and I really just installed chromium, vlc, (I left Firefox on,) I removed big apps like Thunderbird and LibreOffice. I'm thinking that there are unused packages (like libraries) left behind from some of those uninstalls.
– ladaghini
Mar 18 '12 at 14:57
2.5GB is the maximum capacity, and like I said, I have like 300MB remaining.
– ladaghini
Mar 18 '12 at 15:29
2.5GB is the maximum capacity, and like I said, I have like 300MB remaining.
– ladaghini
Mar 18 '12 at 15:29
1
1
2.5 GB is the maximum capacity, which, as I said earlier, I was reaching. What I would like to know is what is filling up that 2.5 GB (which used to be 2.0, but I added another 512 MB) As far as I am concerned, I have fewer programs installed (space usage wise) than a fresh live USB. And yet, even after adding another 512 MB, I have a measly 300 MB left. There must be some useless files just lurking around.
– ladaghini
Mar 19 '12 at 14:59
2.5 GB is the maximum capacity, which, as I said earlier, I was reaching. What I would like to know is what is filling up that 2.5 GB (which used to be 2.0, but I added another 512 MB) As far as I am concerned, I have fewer programs installed (space usage wise) than a fresh live USB. And yet, even after adding another 512 MB, I have a measly 300 MB left. There must be some useless files just lurking around.
– ladaghini
Mar 19 '12 at 14:59
The files on the iso are read only, you can not delete them. A cow file system makes a copy of the files and tracks the changes, so it takes a lot of space. en.wikipedia.org/wiki/Copy-on-write Again, you need to either remaster the iso or perform a standard installation, but persistence does not work they way you think it does, thus it is not behaving as you expect.
– Panther
Mar 19 '12 at 15:39
The files on the iso are read only, you can not delete them. A cow file system makes a copy of the files and tracks the changes, so it takes a lot of space. en.wikipedia.org/wiki/Copy-on-write Again, you need to either remaster the iso or perform a standard installation, but persistence does not work they way you think it does, thus it is not behaving as you expect.
– Panther
Mar 19 '12 at 15:39
add a comment |
up vote
1
down vote
A quick fix is to reduce the archived journals. On my LiveCD those files occupied 300M. Handy when down to 0.
sudo journalctl --vacuum-size=50M
how to clear journal
Then edit journald.conf
sudo nano /etc/systemd/journald.conf
set to desired value:
#SystemMaxUse=50M
After reboot this setting has no effect on Mint.
add a comment |
up vote
1
down vote
A quick fix is to reduce the archived journals. On my LiveCD those files occupied 300M. Handy when down to 0.
sudo journalctl --vacuum-size=50M
how to clear journal
Then edit journald.conf
sudo nano /etc/systemd/journald.conf
set to desired value:
#SystemMaxUse=50M
After reboot this setting has no effect on Mint.
add a comment |
up vote
1
down vote
up vote
1
down vote
A quick fix is to reduce the archived journals. On my LiveCD those files occupied 300M. Handy when down to 0.
sudo journalctl --vacuum-size=50M
how to clear journal
Then edit journald.conf
sudo nano /etc/systemd/journald.conf
set to desired value:
#SystemMaxUse=50M
After reboot this setting has no effect on Mint.
A quick fix is to reduce the archived journals. On my LiveCD those files occupied 300M. Handy when down to 0.
sudo journalctl --vacuum-size=50M
how to clear journal
Then edit journald.conf
sudo nano /etc/systemd/journald.conf
set to desired value:
#SystemMaxUse=50M
After reboot this setting has no effect on Mint.
edited Nov 21 at 15:50
answered Nov 20 at 19:29
OneArb
112
112
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2faskubuntu.com%2fquestions%2f113955%2fcleaning-up-unwanted-files-in-a-liveusb%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
I face the same problem: had a 1Gb flash drive and was suffering from lack of disk space (but Ubuntu was booting, at least). Now, using a 4Gb flash drive (capped to ~2Gb, as discussion) I'm facing the same problems, although I managed to install Java beyond booting. Something is definitely eating out disk.
– Tiago Cardoso
Dec 26 '15 at 18:55
If it helps, using
df -Th
I can see /cow using 100% of available disk space. Question then should be... is it something that could be re-dimentioned?– Tiago Cardoso
Dec 26 '15 at 21:37
for the point '2.', simply call apt clean functionality, his goal is to clean /var/cache/apt content : sudo apt-get clean
– adrenochrome
Feb 19 '16 at 9:31