I'm trying to customize a LiveCD, but I can't manage to fit it on a normal CD. So I investigated, and came across a few files of which I don't know if it's safe to remove them.
Maybe you can help me there?
I don't care if the files get recreated every time, as I remove them just before I start packing everything into a new ISO. So it'll still save me some space.
The files:
/var/cache/apt-xapian-index/index.1/postlist.DB
- This file seems pretty useless to me, and it keeps growing every time. It's now at a 38MB, while I could have sworn it was only 27MB the last time I checked.
/var/cache/apt-xapian-index/index.1/termlist.DB
- Same story as
postlist.DB
.
- Same story as
- The files in
/var/lib/apt/lists/
- Seems to me that those are cached files which get automatically recreated when you run
apt-get update
, is this correct? I don't really dare to remove them unless I'm sure in case I break something. All those files together are about 50MB.
- Seems to me that those are cached files which get automatically recreated when you run
/boot/initrd.img-3.0.0-12-generic
- I'm not at all sure of this one... But doesn't this file get automatically created when the user installs the system to his hard drive? I thought the
initrd.lz
file in thecasper
directory inside the ISO already contained the initrd stuff to boot the liveCD.
- I'm not at all sure of this one... But doesn't this file get automatically created when the user installs the system to his hard drive? I thought the
/var/cache/debconf/templates.dat
- Doesn't this automatically get recreated when some runs
apt-get update
?
- Doesn't this automatically get recreated when some runs
- The rest of the files inside
/var/cache/apt-xapian-index/index.1
- Aren't they all cache files which automatically get recreated?
You don't have to tell me about all the files in one answer. But if you know one or more of them, I'd be grateful if you told me.
I have only partial answer to your 3-year old question.
Delete
/var/cache/apt-xapian-index
The directory is created by
apt-xapian-index
package, which provides the quick search feature in Synaptic Package Manager. This feature is optional, so you can safely delete the content underapt-xapian-index
directory.I saved at least 80 MB on my machine. However, this was done only after I realized these files were not deleted after I had purged the
apt-xapian-index
package some time ago.Purge
apt-xapian-index
This optional feature had been causing some delays when running the package manager every time, at least from my experience on Xubuntu 12.04. So I had removed it. As a result, the quick search box will be missing (marked by a red circle in screenshot below).
Removing the package doesn't mean you can't search in the package manager. While the search box is removed and quick search is disabled, the package manager will now run faster. You can always click on the Search button to do typical search.
Keep
/boot/initrd.img*
When doing chroot, it is essential to preserve
/boot/initrd.img*
and/boot/vmlinuz*
files. I believe these files are needed byupdate-initramfs
command, which will generate appropriate files for existing kernel and later copies them back tocasper
directory.Like you said, it supposedly automatically created but I found this is only true on locally installed system and not for chroot case. If
/boot/initrd.img*
and/boot/vmlinuz*
files were missing, then proceed to create Squashfs, APT will remove and redownload the same packages for existing kernel and do post-installation to ensure those files are restored.You can remove cache files .. they are created when you update or install some files through apt...& it is recommended from my side..don't edit anything inside /boot folder .