How to migrate an IDE to another PC?

gimpo:
Unfortunately, one should have chosen that mode from the begining (i.e. the first installation of the software).

No, you can create the portable folder structure from a non-portable folder structure

{folder on USB drive}
|_arduino-1.8.1
|portable
|
{sketchbook folder}

  • {folder on USB drive} - Can be wherever you want on the drive.
  • arduino-1.8.1 - This contains the contents (not shown here) of your current /home/giulio/arduino-1.8.1/arduino
  • portable - Create this folder and move the contents of your current /home/giulio/.arduino15/ to it.
  • {sketchbook folder} - Optionally you can put your sketchbook within the portable folder in order to have everything under a single folder. You also have the option of putting your sketchbook somewhere else. After setting up your portable installation on the USB drive, start the Arduino IDE and then set the new sketchbook location via File > Preferences > Sketchbook location.