Software miniaturization is a form of software refactoring focused on reducing an application to the bare bone. Porting an application on a hand-held device is very likely to require a preliminary step of software miniaturization, plus the development of device drivers dedicated to the new environment and hardware architecture. This paper presents the process and the lessons learned re-factoring a large Open Source application to get rid of extra fat, to introduce shared libraries, to remove circular dependencies among libraries and, more generally, to minimize inter-library dependencies. While the final goal was to fully exploit shared libraries capabilities, among the various possibilities we defined a process based on the existing knowledge about the application, and aimed to minimize the maintenance effort required by the miniaturization activities.