How to delete unnecessary custom post types in the UI

Currently there is no way on the backend (UI) for unregistering a post type, the
process however is quite simple.

Andrew Nacin provided some code over on https://core.trac.wordpress.org/ticket/14761

You can easily create a plugin with this function and have the CPT unregister.

if ( ! function_exists( 'unregister_post_type' ) ) :
function unregister_post_type( $post_type ) {
global $wp_post_types;
if ( isset( $wp_post_types[ $post_type ] ) ) {
    unset( $wp_post_types[ $post_type ] );
    return true;
}
return false;
}
endif;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)