Don't. Link rot is harsh. Something like wallabag saved so much content for me that is otherwise now lost.
I switched to saving pages using SinglePage instead, that saves the current page as a single stand-alone HTML file. It loses the bookmark-like features, but I can sort those saved files easier in my file system to keep them like any other downloaded documents on various topics. Each file also by default has a comment near the top with its original URL, so it would be easy to write a script to find all of those and build something like bookmarks.html.
No link rot + it's available without internet.