Getting ready for Ubuntu 20.04

2020-04-23 — Written by Andreas Groos

Getting ready for Ubuntu 20.04

I've been running Ubuntu as my main OS since Warty Warthog (4.10). When a new version comes out I usually just use the internal upgrade mechanism which works fine. Today the new LTS (long-term support) version 20.04 Focal Fossa came out and I thought I take the opportunity to do a fresh install. The current installation has been on here for over 2 years and while nothing is 'wrong' with it I figured a fresh start at this point might just be good.

Of course I don't want to loose any data but I also want to retain all the settings including my terminal history and all. So here is what I'm doing to have a smooth transition.

Snap packages:

A lot of applications are now available as snap packages, I can just list them with snap list and save them in a file as snap list > snap.txt.

Deb packages:

If I list all deb packages with apt list --installed all the packages get listed, including dependencies which isn't quite what I want. In order to just list the ones that I manually installed I can use apt-mark showmanual and dump them in a file with apt-mark showmanual > deb.txt

App Images:

App Images are another method of installing applications in Linux, though it seems to have lost to Snap. I still use it for some packages that aren't available as Snap or Deb packages. Recently it seems the only application that I still need to install as an App Image is VNote, a note taking application that allows for VIM keybindings, I love it.

Global npm packages:

That's easy, just run npm list -g --depth 0 with --depth 0 for only listing the top packages and not dependencies.

General backup:

I use back-in-time for my backups. It's simple enough but has all the features I would want. I can for example just exclude all node_modules folders which saves a lot of time and disk space for backups.

back in time

Bash/Zsh history:

I use the zsh autocomplete feature quiet a lot and CTRL-R allows me to fuzzy search through my history. Linux keeps a history of your commands in a text file, so by copying that over I don't loose anything. If you're using bash it'll live in ~/.bash_history, for zsh it is in ~/.zsh_history.


One common practice is to have a git repo just for your 'dotfiles', the files that include settings for your shell, vim etc. Mine can be found here though it isn't very sophisticated. But it helps me to get set up on a new machine in no time. Just clone it into your root folder, create some symlinks and all my customization for git, zsh, aliases and vim are in place.


I'll just transfer my SSH keys over to my new installation, that way I don't have to update github and the servers I'm dealing it.

Config files:

All the application configurations files in Ubuntu are stored in ~/.config/ so I'll copy those over. Instant configuration for all my applications!

I use settings-sync extensions for syncing all my VSCode settings, so there is nothing to be done there. VSCode is working on an internal tool for syncing settings but it's in beta still and the extension serves me well. That way all my custom keybindings, extensions etc gets instantly installed on a new machine.

I think that's it, hopefully I covered everything, otherwise I still got my backups....