Hacker News new | ask | show | jobs
by nirbheek 5360 days ago
Deleting your places.sqlite file is the easiest, but the worst way of defragmenting it. The easiest (if you're using btrfs) is to run:

`btrfs filesystem defragment ~/.mozilla/firefox/*/places.sqlite`

or use ioctl(fd, BTRFS_IOC_DEFRAG, NULL).

As far as I know, this can only be done as root. I'm not sure if other filesystems have similar defrag hooks.

So the correct approach is to make this facility accessible from unprivileged userspace.